Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I stop an Eclipse Feature from starting after it's been installed
    primarykey
    data
    text
    <p>I'm developing several Eclipse Features (groups of Eclipse plugins that form an Installable Unit), and I've been given the requirement that each Feature must have the ability to be deactivated, or in other words, made to not start when Eclipse is started. </p> <p>I have a plugin that makes contributions to the UI (Perspective, Wizards, Menu items, etc), and I've tried to just intercept the call to the start method of the plugin like so...</p> <p>Please note that the class PluginVerification is running in another plugin that will be delivered with the installation of the Feature that contains the plugins that I want to stop. In other words, my Feature consists of Plugins A, B, and C. PluginVerification lives in C, and I want to use it to control the starting of Plugins A and B.</p> <p>Here's Plugin A and B's Activator class's start method</p> <pre class="lang-java prettyprint-override"><code>/* * (non-Javadoc) * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) */ public void start(BundleContext context) throws Exception { if(PluginVerification.verify(this)) { super.start(context); plugin = this; } } </code></pre> <p>If the call to PluginVerification.verify(this) returns false, then I don't start the plugin. This works half way, because the plugin truly does not start, but there are UI artifacts that were contributed by this plugin that still show up. For example, the wizards that this plugin contributes are still accessible via the UI. But when you try to use one of them, NullPointerExceptions are thrown because the plugin never started.</p> <p>I was hoping someone could help me find better place to truly stop a plugin from starting so that it won't contribute it's UI artifacts at all. I'm planning to alert the user that his product isn't verified, and therefore could not be started. I want the user to feel as if the Feature has simply disappeared from his Eclipse environment.</p> <p>Thank you for your consideration, Trace</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload