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;
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;
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;
/**
* PHP specific text editor.
*/
-public class PHPEditor extends TextEditor {
+public class PHPEditor extends TextEditor {
protected PHPActionGroup actionGroup;
/** The outline page */
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);
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);
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.
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);