From 5fd1465938c1a31262eba767faad89a64c716152 Mon Sep 17 00:00:00 2001 From: khartlage Date: Fri, 27 Dec 2002 23:11:03 +0000 Subject: [PATCH 1/1] misc changes --- .../phphelp/actions/PHPEclipseShowContextHelp.java | 12 ++++---- net.sourceforge.phpeclipse/plugin.xml | 32 +++---------------- 2 files changed, 11 insertions(+), 33 deletions(-) diff --git a/net.sourceforge.phpeclipse.debug.phphelp/src/net/sourceforge/phpdt/phphelp/actions/PHPEclipseShowContextHelp.java b/net.sourceforge.phpeclipse.debug.phphelp/src/net/sourceforge/phpdt/phphelp/actions/PHPEclipseShowContextHelp.java index 027eb91..834d108 100644 --- a/net.sourceforge.phpeclipse.debug.phphelp/src/net/sourceforge/phpdt/phphelp/actions/PHPEclipseShowContextHelp.java +++ b/net.sourceforge.phpeclipse.debug.phphelp/src/net/sourceforge/phpdt/phphelp/actions/PHPEclipseShowContextHelp.java @@ -58,18 +58,18 @@ public class PHPEclipseShowContextHelp extends ActionDelegate implements IEditor } } if (editor != null) { - editor.openContextHelp(); + ITextSelection selection = (ITextSelection) editor.getSelectionProvider().getSelection(); + IDocument doc = editor.getDocumentProvider().getDocument(editor.getEditorInput()); + int pos = selection.getOffset(); + String word = getFunctionName(doc, pos); + openContextHelp(word); + } } public void setActiveEditor(IAction action, IEditorPart targetEditor) { if (targetEditor != null && (targetEditor instanceof PHPEditor)) { editor = (PHPEditor) targetEditor; - IDocument doc = editor.getDocumentProvider().getDocument(editor.getEditorInput()); - ITextSelection selection = (ITextSelection) editor.getSelectionProvider().getSelection(); - int pos = selection.getOffset(); - String word = getFunctionName(doc, pos); - openContextHelp(word); } } diff --git a/net.sourceforge.phpeclipse/plugin.xml b/net.sourceforge.phpeclipse/plugin.xml index 68bde16..0cf553c 100644 --- a/net.sourceforge.phpeclipse/plugin.xml +++ b/net.sourceforge.phpeclipse/plugin.xml @@ -7,7 +7,9 @@ class="net.sourceforge.phpeclipse.PHPeclipsePlugin"> - + + + @@ -199,33 +201,8 @@ id="net.sourceforge.phpeclipse.actions.PHPStartMySQLAction"> - -