|How to properly contribute logical functionality from a plugin to an e4 application? [message #1430666]
||Wed, 24 September 2014 16:26
| Thomas Gerlitz
Registered: November 2013
I want to extend an existing TreeViewer, that is located in a part within my E4 Application project, by opening a part in a part stack when an item in the viewer is double clicked. The part that should be opened should be determined dynamically depending on the object that represents the clicked item. I now want to contribute some of these parts as a PartDescriptor within a model fragment to the Application Project. This does work and I can statically create parts that are contributed this way.
But I wonder how to contribute the logic from the plugin to the DoubleClickListener of the TreeViewer to determine if the contributed part fits the clicked item. I can think of two solutions to achieve this.
1. Use an ExtensionPoint which provides an interface for each part that is contributed which can determine if an object can be represented by this part or not. These can than be loaded via the extensions registry by the part or an OSGI service and be checked individually.
2. Provide a model processor which directly registers these interfaces with an OSGI service defined in the application project to contribute the parts to the application.
Or is there a better way to handle logical contributions to already existing parts? I would also be glad if anyone could provide a typical way to solve such kind of problems, because I just recently started to become acquainted with modularization of e4 applications.
Thanks in advance!
[Updated on: Wed, 24 September 2014 21:32]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01825 seconds