I am experienced with Eclipse 3.x development and now want to develop an E4 application. Therefor I tested a simple example in order to get started with the new things.
I was following this tutorial step by step but it results in the same error. However, he is not getting those errors.
I'm using Eclipse Luna (4.4.2) and installed the E4 Tools (0.17).
I've created a new Eclipse 4 Application and added to the Application.e4xmi
the Common Resource Navigator (Project Explorer) as Shared Part using Import 3x -> View as CompatibilityView. I then added a Placeholder which references the shared part. I have added all necessary plugins to the product's dependencies. I also have added the compatibility plugins.
However, when I start the application I get an InjectionException
at InjectorImpl#internalMake()#331
which simply is:
if (unresolved(actualArgs) != -1) continue;
Debugging unresolved()
let me to the following point (InjectorImpl#489
):
Creatable creatableAnnotation = desiredClass.getAnnotation(Creatable.class);
Where the desiredClass
is class org.eclipse.ui.internal.ViewReference
.
Then the function returns 1 which leads to continue in the upper case and the exception. The stacktrace is the following (full here):
!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)
...