01: package net.sf.mockcreator.plugin;
02:
03: import org.eclipse.ui.plugin.*;
04: import org.eclipse.jface.resource.ImageDescriptor;
05: import org.osgi.framework.BundleContext;
06:
07: public class Plugin extends AbstractUIPlugin {
08:
09: private static Plugin plugin;
10:
11: public Plugin() {
12: plugin = this ;
13: }
14:
15: public void start(BundleContext context) throws Exception {
16: super .start(context);
17: }
18:
19: public void stop(BundleContext context) throws Exception {
20: super .stop(context);
21: plugin = null;
22: }
23:
24: public static Plugin getDefault() {
25: return plugin;
26: }
27:
28: public static ImageDescriptor getImageDescriptor(String path) {
29: return AbstractUIPlugin.imageDescriptorFromPlugin("FooBar",
30: path);
31: }
32: }
|