Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » InjectionException on E4 app w/ CompatibilityView (CompatibilityView for Project Explorer cannot be instantiated)
InjectionException on E4 app w/ CompatibilityView [message #1694566] Wed, 06 May 2015 11:12 Go to next message
Lars Schuetze is currently offline Lars SchuetzeFriend
Messages: 1
Registered: June 2012
Junior Member

I am just learning Eclipse E4 development (am used to E3) and struggling with some easy tasks.
I am using Eclipse Luna (4.4.2) and installed E4 Tools Stable (0.17).

I am trying to insert the Project Explorer into my E4 application and have nothing else. So my Application.e4xmi has an Placeholder (Perspective Stack -> Perspective -> Part Sash Container -> Part Stack -> Placeholder) which references a Part I have created as Shared Element as "View as CompatibilityView".

The view is somehow shown (see Picture) but I get an InjectionException because InjectorImpl#internalMake#331 returns 1.
//line 331
if (unresolved(actualArgs) != -1) continue;

I debugged the incident and in InjectorImpl#489 the desiredClass is class org.eclipse.ui.internal.ViewReference.
//line 489
Creatable creatableAnnotation = desiredClass.getAnnotation(Creatable.class);

Stacktrace of the Exception (full see attachment):
!ENTRY org.eclipse.e4.ui.workbench 4 0 2015-05-06 13:00:05.899
!MESSAGE Unable to create class 'org.eclipse.ui.internal.e4.compatibility.CompatibilityView' from bundle '96'
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(
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(

I have added all dependencies to the product (and have added required plugins). Tested with my own target platform and the standard target platform.
I dont know if this is a bug or I did an mistake. If you need any further information I am eager to provide it.

Best regards,
  • Attachment: screen.png
    (Size: 146.70KB, Downloaded 167 times)
  • Attachment: stacktrace.txt
    (Size: 11.25KB, Downloaded 101 times)
Re: InjectionException on E4 app w/ CompatibilityView [message #1694752 is a reply to message #1694566] Thu, 07 May 2015 14:40 Go to previous messageGo to next message
Lars Schütze is currently offline Lars SchützeFriend
Messages: 42
Registered: March 2012
Location: Germany

Crossposting here
Re: InjectionException on E4 app w/ CompatibilityView [message #1694850 is a reply to message #1694752] Fri, 08 May 2015 13:07 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 744
Registered: January 2012
Senior Member

Basically if you want to use E3.x views, use the E3.x APIs. The compatibility layer is implemented using E4 but it has expectations on how things are set up.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:menu and submenu item dynamically generate using rich client platform(RCP)
Next Topic:Possible to develop a feature with GUI (e4 style) to RCP application that has e3.x GUI?
Goto Forum:

Current Time: Thu May 24 23:49:20 GMT 2018

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

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

Back to the top