aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSopot Cela2012-04-11 09:09:14 (EDT)
committerPaul Webster2012-04-11 09:09:14 (EDT)
commite2428b00de59080a4c5ce0e982f62419e9adefd1 (patch)
tree53e24c88f8e26df9e56138cd546d53cec408ae56
parentc432e724c14558715454a991fb4677cdbd3eb3d8 (diff)
downloadeclipse.platform.ui-e2428b00de59080a4c5ce0e982f62419e9adefd1.zip
eclipse.platform.ui-e2428b00de59080a4c5ce0e982f62419e9adefd1.tar.gz
eclipse.platform.ui-e2428b00de59080a4c5ce0e982f62419e9adefd1.tar.bz2
E4Workbench.processHierarchy Just skip handlers with no command.
-rw-r--r--bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4Workbench.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4Workbench.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4Workbench.java
index 1b8a2e9..fc78a1c 100644
--- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4Workbench.java
+++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4Workbench.java
@@ -20,6 +20,7 @@ import org.eclipse.e4.core.services.contributions.IContributionFactory;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.ui.model.application.MApplication;
import org.eclipse.e4.ui.model.application.MApplicationElement;
+import org.eclipse.e4.ui.model.application.commands.MCommand;
import org.eclipse.e4.ui.model.application.commands.MHandler;
import org.eclipse.e4.ui.model.application.commands.MHandlerContainer;
import org.eclipse.e4.ui.model.application.ui.MContext;
@@ -161,7 +162,10 @@ public class E4Workbench implements IWorkbench {
EHandlerService hs = (EHandlerService) context.get(EHandlerService.class.getName());
List<MHandler> handlers = container.getHandlers();
for (MHandler handler : handlers) {
- String commandId = handler.getCommand().getElementId();
+ MCommand command = handler.getCommand();
+ if (command == null)
+ continue;
+ String commandId = command.getElementId();
if (handler.getObject() == null) {
handler.setObject(cf.create(handler.getContributionURI(), context));
}