[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.technology.equinox] Re: New states for plugins
|
The question of who disable / deactivate is not answered yet. It's an open
question for which
Olivier proposed solution
(http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/equinox-home/dynami
cPlugins/classloadersAndInstances.html) Personnaly I made the assumption
that the disable and the deactivate are called by the user (I commited a
small plugin that allows
that).
"Kevin" <kduffey@xxxxxxxxxxxxx> wrote in message
news:b69t4i$nav$1@xxxxxxxxxxxxxxxx
> Second, when a plugin is
> disabled, how do plugins that have references to it react? Are they
notified
> when a plugin they depend on or a service they have acquired at runtime is
> no longer available?
When a plugin is disabled, active plugins are notified of the
disablement.
To be disabled a plugin must be inactive. In contrary to the
unactivation,
the disablement does not cause the disablement of other plugins.
>Do they programmtically have to handle this in such a
> way that if plugin A depends on B, C, D, E, F, and G, and all the plugins
it
> depends on become unavailable, that there is a bunch of if( pluginB is
> available) { do this } else { can't use it so do this } type of code?
A plugin can not be active if its prerequisite are not active.
Deactivation of a plugin
causes all the depending plugins to get deactivated too.
So there is not need for if statements as you said.
The plugin registry only changes when a plugin is "enabled" or "disabled".
PaScaL