Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Adding 3.x ViewParts to E4XMI
Adding 3.x ViewParts to E4XMI [message #881270] Mon, 04 June 2012 04:56 Go to next message
Philipp Arnold is currently offline Philipp Arnold
Messages: 2
Registered: June 2012
Junior Member
Hi Everybody,

this is just a quick and possibly easy to answer question, unfortunately I wasn't able to find much about this.

Is there an easy and straight forward way to add 3.x ViewParts to the E4XMI application model, while using the compatibility layer (especially using the E4 Workbench Model Editor)?

Thank you very much for your help!
Re: Adding 3.x ViewParts to E4XMI [message #881274 is a reply to message #881270] Mon, 04 June 2012 05:09 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5250
Registered: July 2009
Senior Member
You could try (but I never tried this myself) and take a look how the
XMI-Elements produced by the compat layer look like when a view is
opened through it.

An important fact is that e3 views are stored in the shared elements of
your window and then then linked into a perspective using Placeholders!

Tom

Am 04.06.12 10:56, schrieb Philipp Arnold:
> Hi Everybody,
>
> this is just a quick and possibly easy to answer question, unfortunately
> I wasn't able to find much about this.
>
> Is there an easy and straight forward way to add 3.x ViewParts to the
> E4XMI application model, while using the compatibility layer (especially
> using the E4 Workbench Model Editor)?
>
> Thank you very much for your help!
Re: Adding 3.x ViewParts to E4XMI [message #881287 is a reply to message #881270] Mon, 04 June 2012 05:34 Go to previous messageGo to next message
Philipp Arnold is currently offline Philipp Arnold
Messages: 2
Registered: June 2012
Junior Member
Hi Thomas,

thanks for your help. That indeed did the trick.

I just created a new shared element, using "bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView" as class URI while referencing the unique ID of the 3.x ViewParts class. I then used that shared element as reference for a placeholder which I put in place of the original part and everything works as expected.

Again, thank you very much for your quick reply. I really appreciate it.

Cheers Philipp.
Re: Adding 3.x ViewParts to E4XMI [message #932491 is a reply to message #881287] Thu, 04 October 2012 02:33 Go to previous messageGo to next message
Georges Bachelier is currently offline Georges Bachelier
Messages: 25
Registered: May 2010
Junior Member
Hi Philipp and Thomas !

I am writing an E4 RCP application in which I want to add regular Eclipse views such as Console and Error Log. I did the following in the Application.e4xmi file:

1 - Add a PartDescriptor to the Part Descriptors section with:
Id = org.eclipse.ui.console.ConsoleView
Label = Console
Class URI = bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView


2 - Add a Part to the Shared Elements section with the same parameters as above.

3 - Add a Placeholder in the Perspective section with:
Id = org.eclipse.ui.console.ConsoleView
Reference = Part - Console


Things seem to be declared like they appear in the model editor of Juno itself.
But, when I launch my application, I get the following error messages:
!ENTRY org.eclipse.e4.ui.workbench 4 0 2012-10-04 08:10:01.167
!MESSAGE Unable to create class 'org.eclipse.ui.internal.e4.compatibility.CompatibilityView' from bundle '229'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Could not find satisfiable constructor in org.eclipse.ui.internal.e4.compatibility.CompatibilityView
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:327)


Can you help me to fix this, please ?

Georges
Re: Adding 3.x ViewParts to E4XMI [message #972206 is a reply to message #932491] Mon, 05 November 2012 07:45 Go to previous messageGo to next message
Phil M. Fischer is currently offline Phil M. Fischer
Messages: 60
Registered: November 2010
Location: Germany
Member
Hi Georges,

I do have the same problem. I started by using the wizard to create a simple E4-Application example. I then tried to add an old Eclipse3 view to. Im failing with the same error messages you got. Do you have any solution to that issue?

Cheers

Phil
Re: Adding 3.x ViewParts to E4XMI [message #972343 is a reply to message #972206] Mon, 05 November 2012 09:55 Go to previous message
Phil M. Fischer is currently offline Phil M. Fischer
Messages: 60
Registered: November 2010
Location: Germany
Member
Allright.... I found some answer by myself. Instead of creating an E4 RCP Application using an E3 RCP APplication it works. I just defined the E3 App to use the e4xmi model. Still I am not sure about the implications doing it this way :-/

Cheers

Phil
Previous Topic:How to integrate a 3.x-Plugins in an E4 workbench model
Next Topic:Using Babel to translate default dialogs in a e4 Application.
Goto Forum:
  


Current Time: Mon Jul 28 10:40:20 EDT 2014

Powered by FUDForum. Page generated in 0.02708 seconds