Wednesday, February 10, 2010

More fun with Eclipse plugins

Still in the topic of having fun with Eclipse plugin system, this one is also really fun:

public class MyPlugin extends AbstractUIPlugin {
    public static final String PLUGIN_ID = "myplugin";
    private static MyPlugin plugin;

    public void start(BundleContext context) throws Exception {
        System.exit(0);
    }

    public void stop(BundleContext context) throws Exception {
        plugin = null;
        super.stop(context);
    }

    public static MyPlugin getDefault() {
        return plugin;
    }
}

0 comments:

Post a Comment