Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Opening E3.x and E4.x in the same place
Opening E3.x and E4.x in the same place [message #1763654] Thu, 18 May 2017 11:29 Go to next message
István Mészáros is currently offline István MészárosFriend
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:
index.php/fa/29396/0/

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

Re: Opening E3.x and E4.x in the same place [message #1763729 is a reply to message #1763654] Fri, 19 May 2017 07:15 Go to previous messageGo to next message
Martin Jacob is currently offline Martin JacobFriend
Messages: 191
Registered: July 2009
Senior Member
may be this helps: https://dirksmetric.wordpress.com/2012/08/01/tutorial-eclipse-rcp-e4-with-3-x-views-like-project-explorer-properties-etc/
Re: Opening E3.x and E4.x in the same place [message #1764850 is a reply to message #1763729] Fri, 02 June 2017 15:13 Go to previous message
István Mészáros is currently offline István MészárosFriend
Messages: 51
Registered: October 2009
Member
Thanks for the hint, but I used that tutorial in the first place.

Fortunately I could solve the issues. The key thing was that the "Category" of our E4 parts must be set to "org.eclipse.e4.primaryDataStack".

And for the layout I described, the solution was to put the 'Welcome' part in the part stack of the shared area, and let the placeholder be the only child of the perspective. Now it works fine:

index.php/fa/29544/0/
  • Attachment: xmi.png
    (Size: 15.19KB, Downloaded 1851 times)
Previous Topic:Product Configuration Wizard
Next Topic:How do I convert screen percentages in to containerData
Goto Forum:
  


Current Time: Thu Apr 25 12:43:18 GMT 2024

Powered by FUDForum. Page generated in 0.04473 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top