1.0.4 release
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / PHPEditor.java
index 04f7d9e..2d0b71d 100644 (file)
@@ -18,8 +18,6 @@ import net.sourceforge.phpeclipse.phpeditor.php.PHPWordExtractor;
 import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.help.IHelp;
-import org.eclipse.help.IHelpResource;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.MenuManager;
@@ -28,7 +26,6 @@ import org.eclipse.jface.preference.PreferenceConverter;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.jface.text.ITextSelection;
 import org.eclipse.jface.text.source.AnnotationRulerColumn;
 import org.eclipse.jface.text.source.CompositeRuler;
 import org.eclipse.jface.text.source.ISourceViewer;
@@ -41,7 +38,6 @@ import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.graphics.RGB;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.editors.text.TextEditor;
-import org.eclipse.ui.help.WorkbenchHelp;
 import org.eclipse.ui.texteditor.DefaultRangeIndicator;
 import org.eclipse.ui.texteditor.ITextEditorActionConstants;
 import org.eclipse.ui.texteditor.TextOperationAction;
@@ -49,7 +45,7 @@ import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
 /**
  * PHP specific text editor.
  */
-public class PHPEditor extends TextEditor {
+public class PHPEditor extends TextEditor  {
 
   protected PHPActionGroup actionGroup;
   /** The outline page */
@@ -103,11 +99,12 @@ public class PHPEditor extends TextEditor {
 
     markAsStateDependentAction("Comment", true); //$NON-NLS-1$
     markAsStateDependentAction("Uncomment", true); //$NON-NLS-1$
+    
   }
 
-  /** The <code>JavaEditor</code> implementation of this 
+  /** The <code>PHPEditor</code> implementation of this 
    * <code>AbstractTextEditor</code> method performs any extra 
-   * disposal actions required by the java editor.
+   * disposal actions required by the php editor.
    */
   public void dispose() {
     PHPEditorEnvironment.disconnect(this);
@@ -163,9 +160,9 @@ public class PHPEditor extends TextEditor {
       fOutlinePage.setInput(input);
   }
 
-  /** The <code>JavaEditor</code> implementation of this 
+  /** The <code>PHPEditor</code> implementation of this 
    * <code>AbstractTextEditor</code> method adds any 
-   * JavaEditor specific entries.
+   * PHPEditor specific entries.
    */
   public void editorContextMenuAboutToShow(MenuManager menu) {
     super.editorContextMenuAboutToShow(menu);
@@ -174,7 +171,7 @@ public class PHPEditor extends TextEditor {
     actionGroup.fillContextMenu(menu);
   }
 
-  /** The <code>JavaEditor</code> implementation of this 
+  /** The <code>PHPEditor</code> implementation of this 
    * <code>AbstractTextEditor</code> method performs gets
    * the java content outline page if request is for a an 
    * outline page.
@@ -191,27 +188,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);