[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.technology.equinox] Re: Plugins - singletons or not?
|
"pkriens" <Peter.Kriens@xxxxxxxx> wrote in message
news:3E8800D9.4050203@xxxxxxxxxxx
> I am a bit confused. If we have dynamic plugins, we have the problem
> that they can go away. The patterns described to handle plugin creation
> are therefore not applicable anymore, isnt it?
>
> If plugins come and go, we need a service registry approach where the
> plugins are registered and unregistered. Access to static fields and
> getInstance()/getDefault() methods seem to be not sufficient?
Right. In actual fact, the plugin registry already provides this function.
If plugin A is deactivated and reactivated you can safely reference the new
one via the registry. Same for uninstall, install, update, ...
For my money getDefault/getInstance should be
return Platform.getPlugin("my id");
Jeff