In the Eclipse manifest editor, there exist check boxes for enabling/disabling plug-in activation and singleton behavior, as shown below:
[ ] Activate this plug-in when one of its classes is loaded
[ ] This plug-in is a singleton
I'm searching for information or some examples that would demonstrate when activation of the plugin would not be desired (i.e., intentional non-activation). The singleton behavior is clearer (in my opinion) to see when it would be appropriate (e.g., a logger).
Much thanks!
Michael
singleton - Indicates that the bundle can only have a single version resolved in an environment. A value of true indicates that the bundle is a singleton bundle.
Plugin , which is an abstract class that provides generic facilities for managing plug-ins. An Eclipse installation includes a plugins folder where individual plug-ins are deployed. Each plug-in is installed in its own folder under the plugins folder. A plug-in is described in an XML manifest file, called plugin.
When you both don't a) need to do anything special when the plug-in starts and stops; b) don't have any extensions in plugin.xml
which are only picked up on activation. However, those are circumstances where you can not activate. Since it's easy enough to forget about turning automatic activation on when they change, I'd still check the option even in this case. I don't know of any situation where you'd actively want to turn automatic activation off.
No, usually not. Only when two instances of this plug-in would interfere with each other. As you suggest, a logger (both would try to write to same files), a printing library, a graphics toolkit, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With