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
Hello,

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'
!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:346)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:258)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
...

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,
Lars
  • Attachment: screen.png
    (Size: 146.70KB, Downloaded 254 times)
  • Attachment: stacktrace.txt
    (Size: 11.25KB, Downloaded 163 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: 43
Registered: March 2012
Location: Germany
Member

Crossposting here http://stackoverflow.com/questions/30092827/how-to-use-eclipse-3-x-views-in-e4
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
Eclipse UserFriend
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.

Brian.
Previous Topic:Possible to develop a feature with GUI (e4 style) to RCP application that has e3.x GUI?
Next Topic:add views dynamically when using the compat layer
Goto Forum:
  


Current Time: Thu Apr 25 17:41:04 GMT 2024

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

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

Back to the top