Coming to this late, but you can get 90% by self-inject:
private IEclipseContext context;
public void init(IEditorSite site, …) { super.init(site, …);
context = site.getService(IEclipseContext.class); ContextInjectionFactory.inject(this, context); }
public void dispose() { ContextInjectionFactory.uninject(this, context); super.dispose(); }
You have to be careful to not do anything in your constructor or setInitializationData() since they're performed before the call to init().
I opened bug 500688 to discuss was to make this a bit easier.
Brian.
I'd like to use the E4-style DI for creating an editor in the Eclipse IDE, but I can't figure out how. The first thing I tried was implementing an E4-style view and attaching it to an element in the editors extension point, but it didn't work. :-(
I've seen some guides describing how to create E4 views, but all of them seem to be targetted to Eclipse RCP applications. I couldn't find any information related to the Eclipse IDE.
- Stefan
_______________________________________________ platform-ui-dev mailing list platform-ui-dev@xxxxxxxxxxxTo change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/platform-ui-dev
|