Math2mat

/home/ythoma/docs/math2mat/svn/wp1/framework/m2mGUI/src/m2m/frontend/Activator.java

Go to the documentation of this file.
00001 
00020 package m2m.frontend;
00021 
00022 import org.eclipse.jface.resource.ImageDescriptor;
00023 import org.eclipse.ui.plugin.AbstractUIPlugin;
00024 import org.osgi.framework.BundleContext;
00025 
00029 public class Activator extends AbstractUIPlugin {
00030 
00031         // The plug-in ID
00032         public static final String PLUGIN_ID = "m2mgui";
00033 
00034         // The shared instance
00035         private static Activator plugin;
00036         
00040         public Activator() {
00041         }
00042 
00043         /*
00044          * (non-Javadoc)
00045          * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
00046          */
00047         public void start(BundleContext context) throws Exception {
00048                 super.start(context);
00049                 plugin = this;
00050         }
00051 
00052         /*
00053          * (non-Javadoc)
00054          * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
00055          */
00056         public void stop(BundleContext context) throws Exception {
00057                 plugin = null;
00058                 super.stop(context);
00059         }
00060 
00066         public static Activator getDefault() {
00067                 return plugin;
00068         }
00069 
00077         public static ImageDescriptor getImageDescriptor(String path) {
00078                 return imageDescriptorFromPlugin(PLUGIN_ID, path);
00079         }
00080 }
 All Classes Namespaces Files Functions Variables Enumerations