@Inject IEclipseContext eclipseContext; [...] MyClass myObj = new MyClass(a, b, c, d, e, f, bugsBunny, omega) ; ContextInjectionFactory.inject(myObj, eclipseContext); // A eclipseContext.set(MyClass.class, myObj); // B
@Inject MyClass myObj; || || \/ org.eclipse.e4.core.di.InjectionException: Unable to process "Foo.myObj": no actual value was found for the argument "MyClass".
IEclipseContext eclipseContext = EclipseContextFactory .getServiceContext(bundleContext);
IEclipseContext eclipseContext = E4Workbench.getServiceContext();