How to structure dependent plugin project [message #606230] |
Sun, 04 July 2010 21:46 |
Gerald Rosenberg Messages: 106 Registered: July 2009 |
Senior Member |
|
|
Is there a way to structure a library/support plugin to allow use with an *open set* of front-end
plugins? That is:
APlugin requires LibPlugin
BPlugin requires LibPlugin
....
NPlugin requires LibPlugin
Where the front-end plugins contain specialization configuration data, factory class accessors,
etc. The front-end plugins may be loaded concurrently.
The basic need is for the LibPlugin to implement something like "LibPlugin.getDefault()" to return
a reference to the actual front-end instance. The LibPlugin is fairly complete editor
implementation, so passing a parameter reference to the front-end plugin throughout the internals
of the LibPlugin would be difficult.
Pushing a front-end plugin instance reference down into the LibPlugin does not work, since the
static variables within LibPlugin are singletons within the scope of the one LibPlugin classloader.
Converting the LibPlugin to a jar would allow the front-end plugins to effectively load the
LibPlugin jar using their separate classloaders, but at the loss of the standard plugin features.
Is there another strategy that retains the plugin character of a LibPlugin? What am I missing?
Thanks...
|
|
|
Powered by
FUDForum. Page generated in 0.03248 seconds