Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to integrate a 3.x-Plugins in an E4 workbench model
How to integrate a 3.x-Plugins in an E4 workbench model [message #778369] Thu, 12 January 2012 16:01 Go to next message
c h is currently offline c hFriend
Messages: 4
Registered: February 2011
Location: Wertheim
Junior Member
Hello,

i want to migrate a 3.x-based application to Eclipse 4. The approach of adding some compat layer dependencies works fine, but i want to use the new e4xmi workbench model. So i want to build a "fresh" e4 app and integrate some 3.x-Plugins.

(How) Can i do this? Is there a way to do this directly in the e4xmi workbench model?
Re: How to integrate a 3.x-Plugins in an E4 workbench model [message #793664 is a reply to message #778369] Wed, 08 February 2012 12:09 Go to previous messageGo to next message
Anders Forsell is currently offline Anders ForsellFriend
Messages: 127
Registered: July 2009
Senior Member
I am also interested in an answer to this question.

My problem is that our RCP application is using a GEF editor. The application runs fine unmodified in 4.x through the compat layer, and I have been able to add "clean" e4 parts using model contributions (through the extension point "org.eclipse.e4.workbench.model"). The selection from the GEF editor is propagated correctly through the selection service and injected in the added e4 part.

I would much rather model my RCP application declaratively and somehow include the GEF editor as an e4 part that is run through the compat layer.

I know that this may not be the focus for the Juno release, but is it technically possible?

Anders
Re: How to integrate a 3.x-Plugins in an E4 workbench model [message #803424 is a reply to message #793664] Tue, 21 February 2012 10:25 Go to previous messageGo to next message
Fredrik Attebrant is currently offline Fredrik AttebrantFriend
Messages: 7
Registered: October 2010
Junior Member
Hi,

Having investigated this further, you can't use "3.x" parts in an 4.x modeled application.
The compatibility layer which supports running 3.x parts on the 4.x platform, is created when you call PlatformUI.createAndRunWorkbench(...) during startup of your RCP application.
This parses the extensions of your plug-ins and creates the whole context for running your legacy parts.
You can still add "pure" 4.x parts.

The inverse, starting with a modeled e4 application and adding "3.x parts" is not possible, since there is no compatibility layer to host them.

Thus, the conclusion is that until you've converted all your 3.x parts to be "pure" 4.x parts, you can't make the switch to the e4 application model.

--Fredrik
Re: How to integrate a 3.x-Plugins in an E4 workbench model [message #803640 is a reply to message #803424] Tue, 21 February 2012 16:05 Go to previous messageGo to next message
Greg Babcock is currently offline Greg BabcockFriend
Messages: 53
Registered: July 2009
Member
Eclipse 4.2 uses E4AP and most of the project (including JDT) are 3.x projects integrated using compatibility mode. You can verify this by looking at the live model. The 3.x views reference bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView.

You can even add a 3.x view into your 4.x model by referencing the 3.x view id, and the compatibility mode class (disclaimer I have added a 3.x view to my model, but I have not as of yet tested it). What I have not been able to figure out is how to get compatibility mode to add in the parts, or in other words how to do it the correct way.
Re: How to integrate a 3.x-Plugins in an E4 workbench model [message #804096 is a reply to message #803640] Wed, 22 February 2012 07:34 Go to previous messageGo to next message
Fredrik Attebrant is currently offline Fredrik AttebrantFriend
Messages: 7
Registered: October 2010
Junior Member
Well, I did try that and it results in the 3.x view being "allocated" (there's a tab with a label for it in the part stack) in the UI but the CompatibilityView can't be created - see below.

Until otherwise proven, I believe that you can't just create a CompatibilityView without initializing the whole compatibility layer, which is done when you launch via the "Legacy e4" application, where the "legacy context" for the compatibility layer gets created. In that context, legacy views can be created. Without it - see below...

!ENTRY org.eclipse.e4.ui.workbench 4 0 2012-02-21 18:59:01.273
!MESSAGE Unable to create class 'org.eclipse.ui.internal.e4.compatibility.CompatibilityView' from bundle '70'
!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:326)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:239)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:153)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:141)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:883)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:617)
<snip - omitting the full stack trace... -ping me if you'd like to see it...>

Re: How to integrate a 3.x-Plugins in an E4 workbench model [message #809072 is a reply to message #804096] Tue, 28 February 2012 13:01 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Yes, you need the entire 4.2 Workbench (plus all of its services) to instantiate a 3.x IViewPart correctly.

PW


Re: How to integrate a 3.x-Plugins in an E4 workbench model [message #932655 is a reply to message #778369] Thu, 04 October 2012 09:51 Go to previous messageGo to next message
Georges Bachelier is currently offline Georges BachelierFriend
Messages: 29
Registered: May 2010
Junior Member
Hi Paul !

While trying to use the 3.x Console view in my E4 RCP application, I am facing the same InjectionException issue on CompatibilityView.

What do you mean by "need the entire 4.2 workbench (plus all of its services) ?
Does this mean that I have to select the whole Target Platform in the Run Configuration ? Is there anything more to do ?

Thanks a lot in advance for your time !

Georges
Re: How to integrate a 3.x-Plugins in an E4 workbench model [message #972196 is a reply to message #932655] Mon, 05 November 2012 12:39 Go to previous message
Philipp M. Fischer is currently offline Philipp M. FischerFriend
Messages: 67
Registered: November 2010
Location: Germany
Member
Hi There,

I am facing exactly the same problem. All the fency magic with the e4xmi vanishes away not being able to integrate an old 3.x Plugin Sad

Does anyone have some experience with this.

!ENTRY org.eclipse.e4.ui.workbench 4 0 2012-11-05 13:37:35.233
!MESSAGE Unable to create class 'org.eclipse.ui.internal.e4.compatibility.CompatibilityView' from bundle '70'
!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)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:240)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:161)
Previous Topic:Confirm exit dialog when pressing `X` button
Next Topic:Using Babel to translate default dialogs in a e4 Application.
Goto Forum:
  


Current Time: Thu Mar 28 11:35:38 GMT 2024

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

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

Back to the top