added code completion for HTML mode
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / PHPEditor.java
index adcf53d..71f26dc 100644 (file)
@@ -67,9 +67,10 @@ public class PHPEditor extends TextEditor {
   }
 
   public PHPContentOutlinePage getfOutlinePage() {
-    return fOutlinePage; 
+    return fOutlinePage;
   }
-  /** The <code>JavaEditor</code> implementation of this 
+
+  /** The <code>PHPEditor</code> implementation of this 
    * <code>AbstractTextEditor</code> method extend the 
    * actions to add those specific to the receiver
    */
@@ -100,6 +101,8 @@ public class PHPEditor extends TextEditor {
 
     actionGroup = new PHPActionGroup(this, ITextEditorActionConstants.GROUP_EDIT);
 
+    markAsStateDependentAction("Comment", true); //$NON-NLS-1$
+    markAsStateDependentAction("Uncomment", true); //$NON-NLS-1$
   }
 
   /** The <code>JavaEditor</code> implementation of this 
@@ -188,27 +191,27 @@ public class PHPEditor extends TextEditor {
     return super.getAdapter(required);
   }
 
-  public void openContextHelp() {
-    IDocument doc = this.getDocumentProvider().getDocument(this.getEditorInput());
-    ITextSelection selection = (ITextSelection) this.getSelectionProvider().getSelection();
-    int pos = selection.getOffset();
-    String word = getFunctionName(doc, pos);
-    openContextHelp(word);
-  }
-
-  private void openContextHelp(String word) {
-    open(word);
-  }
-
-  public static void open(String word) {
-    IHelp help = WorkbenchHelp.getHelpSupport();
-    if (help != null) {
-      IHelpResource helpResource = new PHPFunctionHelpResource(word);
-      WorkbenchHelp.getHelpSupport().displayHelpResource(helpResource);
-    } else {
-      //   showMessage(shell, dialogTitle, ActionMessages.getString("Open help not available"), false); //$NON-NLS-1$
-    }
-  }
+//  public void openContextHelp() {
+//    IDocument doc = this.getDocumentProvider().getDocument(this.getEditorInput());
+//    ITextSelection selection = (ITextSelection) this.getSelectionProvider().getSelection();
+//    int pos = selection.getOffset();
+//    String word = getFunctionName(doc, pos);
+//    openContextHelp(word);
+//  }
+//
+//  private void openContextHelp(String word) {
+//    open(word);
+//  }
+//
+//  public static void open(String word) {
+//    IHelp help = WorkbenchHelp.getHelpSupport();
+//    if (help != null) {
+//      IHelpResource helpResource = new PHPFunctionHelpResource(word);
+//      WorkbenchHelp.getHelpSupport().displayHelpResource(helpResource);
+//    } else {
+//      //   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);