Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbchilds2007-07-31 16:01:58 +0000
committerbchilds2007-07-31 16:01:58 +0000
commit547f4f676008333de4727adfb844866ae748be0d (patch)
treedc2d25033acae6c1f55b731ae64c14a6f011ba09
parent56ed6f59e29aa1a82ee30ad38de9348d4361aea6 (diff)
downloadwebtools.sourceediting-547f4f676008333de4727adfb844866ae748be0d.tar.gz
webtools.sourceediting-547f4f676008333de4727adfb844866ae748be0d.tar.xz
webtools.sourceediting-547f4f676008333de4727adfb844866ae748be0d.zip
Should fix cosmetic NPE in log. I suspect real error is further up (in SSE).
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/SimpleJSDTActionProxy.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/SimpleJSDTActionProxy.java b/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/SimpleJSDTActionProxy.java
index 0ca4ba3d47..1a652e88c1 100644
--- a/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/SimpleJSDTActionProxy.java
+++ b/bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/SimpleJSDTActionProxy.java
@@ -75,6 +75,7 @@ public class SimpleJSDTActionProxy implements IObjectActionDelegate {
Class[] types = new Class[] { IWorkbenchSite.class };
Constructor cons = target.getConstructor(types);
Object[] args = new Object[] { targetWorkbenchPart.getSite() };
+
actionHandlerTarget = cons.newInstance(args);
handlerTargetAction = action;
return actionHandlerTarget;
@@ -144,6 +145,8 @@ public class SimpleJSDTActionProxy implements IObjectActionDelegate {
public void selectionChanged(IAction action, ISelection selection) {
currentSelection = selection;
+ if(targetWorkbenchPart==null) return;
+
try {
Object handler = getActionHandler(action);
SimpleJSDTActionProxy.executeMethod(handler, "selectionChanged", getSelectionChangeArgTypes(), getSelectionChangeArgs(action, selection));

Back to the top