[E4AP] NPE during loading of workbench.xmi [message #911441] |
Tue, 11 September 2012 15:51 |
Christoph Keimel Messages: 482 Registered: December 2010 Location: Germany |
Senior Member |
|
|
After resolving my problem described in this thread, I stumbled on a new issue:
When the workbenach.xmi is loaded, an NPE is thrown:
!ENTRY org.eclipse.e4.ui.workbench 4 0 2012-09-11 17:33:18.756
!MESSAGE Exception occurred while rendering: org.eclipse.e4.ui.model.application.ui.basic.impl.PartStackImpl@1a4c5b4 (elementId: testapp.stack.right, tags: [], contributorURI: platform:/plugin/de.emsw.gosa.product.testapp) (widget: CTabFolder {}, renderer: org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer@1e2161d, toBeRendered: true, onTop: false, visible: true, containerData: 10000, accessibilityPhrase: null)
!STACK 0
java.lang.NullPointerException
at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showTab(LazyStackRenderer.java:156)
at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1024)
at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:98)
Debugging the code reveals, that the NPE is caused, because the element (the Part that is to be shown) does not have a parent (eContainer), so element.getParent() returns null.
This seems to be the case for all parts that are added through a fragment. I have created a simple testcase to confirm the issue.
1) Start the application with the testapp.product in de.emsw.gosa.product.testapp.
2) Close the application
3) Start the application again and DO NOT clean the configuration, so workbench.xmi gets loaded
I will also create a bug report for this shortly. For now, I would be most gratefull, if someone could give me hints to find a workaround. I have a demo coming up, and it would be great if I could show how the application model is persisted and restored.
Greetings
Christoph
P.S. I am using org.eclipse.e4.ui.workbench.renderers.swt_0.10.1.v20120523-1955.jar, but I also confirmed the bug with the current sources on git://git.eclipse.org/gitroot/platform/eclipse.platform.ui: 0.10.2
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03991 seconds