Extensions and multi plug-in RCP app [message #463397] |
Sat, 10 February 2007 10:11  |
Eclipse User |
|
|
|
Originally posted by: martina.smith.spif.com
Hi forum,
I realize that my question probably is a very general plug-in life-cycle
question, but here goes:
I have a multi plug-in RCP application (my first - done plug-in dev for IDE
prev). The application plug-in defines the main menu and the the main view.
The idea is that the other plug-in snow should contribute and extend
functionallity to the main menu and view.
I have done some tests and I cannot get this to work, I'm not sure if I'm
missing some basic OSGi knowhow or not.
One idea that I had is that the lazy loading principle prevents the other
plugs-ins to be loaded - if so will earlyStartup help (not sure)
The solution for this should then probably be that the main plug-in actually
is the one that publish the extension points (and that my other plug-in
implements those)
Any ideas/clarifications/explanation needed!!!!
Martina
|
|
|
|
Re: Extensions and multi plug-in RCP app [message #463455 is a reply to message #463397] |
Mon, 12 February 2007 09:02  |
Eclipse User |
|
|
|
Martina wrote:
> Hi forum,
>
> I realize that my question probably is a very general plug-in life-cycle
> question, but here goes:
>
> I have a multi plug-in RCP application (my first - done plug-in dev for IDE
> prev). The application plug-in defines the main menu and the the main view.
> The idea is that the other plug-in snow should contribute and extend
> functionallity to the main menu and view.
> I have done some tests and I cannot get this to work, I'm not sure if I'm
> missing some basic OSGi knowhow or not.
Extension Points follow a registration type pattern (and the benefit is
they don't cause plugin activation by themselves).
Here's a simplified example of actionSets (if you did them using RCP).
you write com.example.rcp.core, which publishes
com.example.rcp.actionSets extension point,
com.example.rcp.IActionDelegate interface, and has an ActionSetRegistry
class that can read and instantiate action sets using
IConfigurationElement#createExecutableExtension(*)
you write com.example.rcp.app which runs your application, and
instantiates ActionSetRegistry and asks it to read and run all of the
actionSets.
Then any plugin that wanted to contribute would depend on
com.example.rcp.core, provide an extension for
com.example.rcp.actionSets, and have classes implemented IActionDelegate.
You could collapse com.example.rcp.core and com.example.rcp.app into one
plugin, it just means that all contributed plugins depend on your
application plugin (maybe that's OK for you).
Later,
PW
|
|
|
Powered by
FUDForum. Page generated in 0.04035 seconds