PHP perspective and new Project Wizard
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / PHPActionContributor.java
index 54a3038..6f35ce5 100644 (file)
@@ -30,6 +30,9 @@ import org.eclipse.ui.texteditor.TextEditorAction;
  */
 public class PHPActionContributor extends TextEditorActionContributor {
 
+  public static final String COMMENT = "net.sourceforge.phpeclipse.phpeditor.comment";
+  public static final String UNCOMMENT = "net.sourceforge.phpeclipse.phpeditor.uncomment";
+  
   protected RetargetTextEditorAction fContentAssistProposal;
   protected RetargetTextEditorAction fContentAssistTip;
   protected TextEditorAction fTogglePresentation;
@@ -77,6 +80,10 @@ public class PHPActionContributor extends TextEditorActionContributor {
     fContentAssistProposal.setAction(getAction(editor, "ContentAssistProposal")); //$NON-NLS-1$
     fContentAssistTip.setAction(getAction(editor, "ContentAssistTip")); //$NON-NLS-1$
 
+    IActionBars bars= getActionBars();    
+    bars.setGlobalActionHandler(COMMENT, getAction(editor, "Comment"));
+    bars.setGlobalActionHandler(UNCOMMENT, getAction(editor, "Uncomment"));
+    
     fTogglePresentation.setEditor(editor);
     fTogglePresentation.update();