Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Creating an E4 view or editor in the eclipse workbench

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.

On 20-Sep-2016, at 9:17 AM, Stefan Xenos <sxenos@xxxxxxxxxx> wrote:

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.

Is it even possible?

  - Stefan
_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-ui-dev


Back to the top