added a builder to parse files with eclipse's build mechanisms
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / PHPEditor.java
index 712a200..ac8fa19 100644 (file)
@@ -346,11 +346,14 @@ public class PHPEditor
     super.doSave(monitor);
     // compile or not, according to the user preferences
     IPreferenceStore store = getPreferenceStore(); // fPHPPrefStore;
-    if (store.getBoolean(PHPeclipsePlugin.PHP_PARSE_ON_SAVE)) {
-      IAction a = PHPParserAction.getInstance();
-      if (a != null)
-        a.run();
-    }
+
+    // the parse on save was changed to the eclipse "builders" concept
+    //    if (store.getBoolean(PHPeclipsePlugin.PHP_PARSE_ON_SAVE)) {
+    //      IAction a = PHPParserAction.getInstance();
+    //      if (a != null)
+    //        a.run();
+    //    }
+
     //    if (SWT.getPlatform().equals("win32")) {
     //      IAction a = ShowExternalPreviewAction.getInstance();
     //      if (a != null)
@@ -393,20 +396,25 @@ public class PHPEditor
    */
   public void editorContextMenuAboutToShow(MenuManager menu) {
     super.editorContextMenuAboutToShow(menu);
-               menu.appendToGroup(ITextEditorActionConstants.GROUP_UNDO, new Separator(IContextMenuConstants.GROUP_OPEN));     
-               menu.insertAfter(IContextMenuConstants.GROUP_OPEN, new GroupMarker(IContextMenuConstants.GROUP_SHOW));  
-               
-               ActionContext context= new ActionContext(getSelectionProvider().getSelection());
-               fContextMenuGroup.setContext(context);
-               fContextMenuGroup.fillContextMenu(menu);
-               fContextMenuGroup.setContext(null);
-//    addAction(menu, ITextEditorActionConstants.GROUP_EDIT, "Format"); //$NON-NLS-1$
-//
-//    ActionContext context =
-//      new ActionContext(getSelectionProvider().getSelection());
-//    fContextMenuGroup.setContext(context);
-//    fContextMenuGroup.fillContextMenu(menu);
-//    fContextMenuGroup.setContext(null);
+    menu.appendToGroup(
+      ITextEditorActionConstants.GROUP_UNDO,
+      new Separator(IContextMenuConstants.GROUP_OPEN));
+    menu.insertAfter(
+      IContextMenuConstants.GROUP_OPEN,
+      new GroupMarker(IContextMenuConstants.GROUP_SHOW));
+
+    ActionContext context =
+      new ActionContext(getSelectionProvider().getSelection());
+    fContextMenuGroup.setContext(context);
+    fContextMenuGroup.fillContextMenu(menu);
+    fContextMenuGroup.setContext(null);
+    //    addAction(menu, ITextEditorActionConstants.GROUP_EDIT, "Format"); //$NON-NLS-1$
+    //
+    //    ActionContext context =
+    //      new ActionContext(getSelectionProvider().getSelection());
+    //    fContextMenuGroup.setContext(context);
+    //    fContextMenuGroup.fillContextMenu(menu);
+    //    fContextMenuGroup.setContext(null);
   }
 
   protected void updateStateDependentActions() {