first PHP parser version (doesn't work actually)
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / PHPEditor.java
index 2608187..11cf34f 100644 (file)
@@ -29,12 +29,12 @@ import org.eclipse.ui.help.WorkbenchHelp;
 import org.eclipse.ui.texteditor.DefaultRangeIndicator;
 import org.eclipse.ui.texteditor.TextOperationAction;
 import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-
+import org.eclipse.jface.action.IAction;
 /**
  * Java specific text editor.
  */
 public class PHPEditor extends TextEditor {
-  
+
   /** The outline page */
   private PHPContentOutlinePage fOutlinePage;
 
@@ -94,6 +94,10 @@ public class PHPEditor extends TextEditor {
    */
   public void doSave(IProgressMonitor monitor) {
     super.doSave(monitor);
+    // compile or not, according to the user preferences
+    IAction a = PHPParserAction.getInstance();
+    if (a != null)
+      a.run();
     if (fOutlinePage != null)
       fOutlinePage.update();
   }
@@ -166,7 +170,7 @@ public class PHPEditor extends TextEditor {
       //   showMessage(shell, dialogTitle, ActionMessages.getString("Open help not available"), false); //$NON-NLS-1$
     }
   }
-  
+
   private String getFunctionName(IDocument doc, int pos) {
     Point word = PHPWordExtractor.findWord(doc, pos);
     if (word != null) {