Question

Is it possible to create Eclipse plug-ins (e.g view parts) using Eclipse e4 incubator? Or is e4 only useful for 'window-based' applications?

I already checked How can I create a view using the E4 programming model to be a plug-in for Eclipse 4.2 or above?, but this did not give me an useful answer.

Add: I want to create an Eclipse plug-in and not a standalone rcp application.

Was it helpful?

Solution

I'm not sure what exactly you want to achieve.

Option 1: You want to write a plug-in for an e4 RCP application: You can do this (e.g., contribute ViewParts to an e4 application model) via a model fragment.

Basically, instead of extending the org.eclipse.ui.views extension point in Eclipse 3.x you create an application model fragment file in your plug-in and reference this in an extension to the extension point org.eclipse.e4.workbench.model. In the model fragment, you define the parts, commands, etc. you want to contribute.

See for example these tutorials for more details:

Option 2: You want to write a plug-in e4 style for Eclipse itself.

As far as I know this is not possible straightforward, because currently, the Eclipse IDE cannot be enhanced with fragments (at least that is what https://bugs.eclipse.org/bugs/show_bug.cgi?id=376486 indicates ...) But when that works, see Option 1.

Until then, you'd have to use the classic extension points. You can still write your view using the POJO/Injection approach of e4, but you need to use the 3.x to e4 bridge. You can get some hints from http://eclipsesource.com/blogs/2012/06/18/migrating-from-eclipse-3-x-to-eclipse-4-e4/ . In particular, see the paragraph starting "The third option is to use the 3.x e4 bridge from the e4 tools project"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top