diff options
author | bchilds | 2007-07-31 16:01:58 +0000 |
---|---|---|
committer | bchilds | 2007-07-31 16:01:58 +0000 |
commit | 547f4f676008333de4727adfb844866ae748be0d (patch) | |
tree | dc2d25033acae6c1f55b731ae64c14a6f011ba09 | |
parent | 56ed6f59e29aa1a82ee30ad38de9348d4361aea6 (diff) | |
download | webtools.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.java | 3 |
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)); |