In the Eclipse (2.1) because the plugin registry is static, no events are really coming from it.
In the dynamic plugins, as the registry will become dynamic to support the dynamic addition and
removal of plugins (and so extensions and extension points), a notification mechanism needs to
be created so plugins and other interested parties can react to those modifications.
This event is accompanied by a registry delta that describes the changes.
Plugins are notified in prerequisite order (i.e., prerequisites first). See also API extensions.
Notification mechanism
In order to put in place the notification mechanism, we took ideas from the Resource listener mechanism (IResourceListener, IResourceChangeEvent, IResourceDelta,...).
The current proposal for the notification mechanism offers the same concepts:
IPluginRegistryDelta: the delta containing the modification that are happening into the repository
IPluginRegistryChangeEvent: the event carrying the delta
The main difference lies in the fact that only active plugins are being notified, and plugins do not need to register to modifications.
The newly added method registryChanged(IPluginRegistryChangedEvent) is always called.
Notification mechanism discussions
Should the notification be done before and after the actual modification is being done (like there is a pre and post events)?
Pascal: It seems necessary that both notification occurs, because the after step couls allow plugin to do extra clean-up once the plugin being
deactivated will have done its clean-up.
Should we authorise anyone to register to listen to the registry? If so, when are those listener get notified?