equinox
dynamic plugins > deactivating plugins > usecases

 
Usecase: The Resources Plugin

The resources plugin is central to Eclipse as a tooling platform and is very likely to be referenced (classes or instances) from many plugins. Moreover the resources plugins is offering several important extension-points (markers, builders, natures). We will use it as the canonical case for plugin deactivation. That is, we will study the plugin mechanism through two points of view: "deactivation of a plugin based on the resources plugin" and "deactivation of the resource plugin itself".

Deactivation of a plugin based on the Resources plugin:

Convention: PA always named the plugin being deactivated.

Deactivating the resource plugin itself

One important point to remember in the deactivation process, is that to instantiate classes from P1, P2 must requires P1. The consequence is that when P1 will be deactivated P2 will also be deactivated, and before P1 (see : deactivating plugins).
More importantly, it means that we cannot deactivate P2 if P1 is not ok to be deactivated...