| Declaring parts being based on PartDescriptors in E4XMI [message #926051] |
Fri, 28 September 2012 05:01  |
Ralph Schuster Messages: 3 Registered: September 2012 |
Junior Member |
|
|
Hi,
I have an application that needs to open three instances of the same part when starting up. I described the PartDescriptor but I can't get the parts being instantiated when the application comes up.
1) Is it possible to reference the part descriptor in the part description within e4xmi file? If so, how?
2) If not, at what stage I can use partService.create(descriptorId) to programmatically create the parts? I wasn't able to find a hook in the lifecycle where this is possible. Usually it throws an application saying that the application doesn't have any active window yet, e.g.
java.lang.IllegalStateException: Application does not have an active window
at org.eclipse.e4.ui.internal.workbench.ApplicationPartServiceImpl.getActiveWindowService(ApplicationPartServiceImpl.java:36)
at org.eclipse.e4.ui.internal.workbench.ApplicationPartServiceImpl.createPart(ApplicationPartServiceImpl.java:95)
at myapp.rcp.ui.model.ApplicationLifecycleHook.addPart(ApplicationLifecycleHook.java:143)
at myapp.rcp.ui.model.ApplicationLifecycleHook.configurePerspective(ApplicationLifecycleHook.java:109)
at myapp.rcp.ui.model.ApplicationLifecycleHook.elementVisible(ApplicationLifecycleHook.java:78)
...
|
|
|