Opening E3.x and E4.x in the same place [message #1763654] |
Thu, 18 May 2017 11:29 |
István Mészáros Messages: 51 Registered: October 2009 |
Member |
|
|
Hello all, we have an application that runs as an E4 application with the compatibility layer, i.e. it is started as a legacy RCP application but uses an E4 application model.
All of our parts are E4 parts, but we use old components from JDT and the Eclipse Groovy Editor.
The layout of the application's perspective is very simple, it has one big part stack that should take all available space and show both E4 and E3 parts.
Initially, an E4 part should be presented as a 'Welcome' screen.
Our problem is that i'm unable to configure the application model show both E3 and E4 parts in the same part stack.
The only configuration that works throws exceptions on startup:
java.lang.ClassCastException: org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl cannot be cast to org.eclipse.e4.ui.model.application.ui.basic.MPart
at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.createTab(StackRenderer.java:799)
Currently, my XMI looks like this:
Of course the Area cannot be a child of a Part Stack, but for some reason, despite the above exception this configuration works as desired.
We usually open our E4 parts like this:
MPart part = partService.findPart(PartClass.PART_ID);
if (part == null) {
part = partService.createPart(PartClass.PART_ID);
partService.showPart(part, PartState.ACTIVATE);
}
partService.activate(part, true);
and open the legacy E3 editor like this:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(new FileEditorInput(file),
desc.getId());
Can you suggest me a layout that looks as desired and does not violate the application XMI rules? In any other ways the perspective was split up to multiple areas/stacks.
Thanks in advance.
-
Attachment: xmi.png
(Size: 64.56KB, Downloaded 1952 times)
[Updated on: Thu, 18 May 2017 11:57] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03519 seconds