Project: Eclipse_Platform_UI
Bug 376253 Handler with no command NPEs in E4Workbench.processHierarchy
Reported: 2012-04-06 09:26:33 | Status: verified fixed

If i put two Handlers to a TrimmedWindow and use only of it (attribut commandId of one of the both handlers isn't used) i get following error: !ENTRY org.eclipse.e4.ui.workbench 4 0 2012-04-06 15:04:44.918 !MESSAGE Exception occurred while rendering: org.eclipse.e4.ui.model.application.ui.basic.impl.TrimmedWindowImpl@c1a0eb (elementId: null, tags: null, contributorURI: platform:/plugin/net.teufel.e4.helloworld.ui) (widget: null, renderer: null, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: Hello world, iconURI: null, tooltip: null, context: TrimmedWindowImplContext, variables: [], x: -2147483648, y: -2147483648, width: 640, height: 480) !STACK 0 java.lang.NullPointerException at org.eclipse.e4.ui.internal.workbench.E4Workbench.processHierarchy(E4Workbench.java:164) What is the idea behind putting Handlers to Window or TrimmedWindow? To get a better structure? When does it makes sense to collect more than one item in a window? Each handler has to be conntected to a command, why am i only able to define commands inside of Application? At the moment I have to connect each Handler to a command otherwise i get the error above so its not possible to hold two times a similar handler in a TrimmedWindow and decide during runtime wich of the two handlers gets active finally and will be connected to the Toolbaritem.

Files changed in fix:
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4Workbench.java