]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.document.linking.ui/src/org/simantics/document/linking/Activator.java
722796a74b60104bc32642347d94102ee1d50700
[simantics/platform.git] / bundles / org.simantics.document.linking.ui / src / org / simantics / document / linking / Activator.java
1 package org.simantics.document.linking;
2
3 import org.eclipse.jface.resource.ImageDescriptor;
4 import org.eclipse.ui.plugin.AbstractUIPlugin;
5 import org.osgi.framework.BundleContext;
6
7 /**
8  * The activator class controls the plug-in life cycle
9  */
10 public class Activator extends AbstractUIPlugin {
11         
12         public ImageDescriptor cross;
13         public ImageDescriptor clock_red;
14
15         // The plug-in ID
16         public static final String PLUGIN_ID = "org.simantics.document.linking.ui"; //$NON-NLS-1$
17
18         // The shared instance
19         private static Activator plugin;
20         
21         /**
22          * The constructor
23          */
24         public Activator() {
25         }
26
27         /*
28          * (non-Javadoc)
29          * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
30          */
31         public void start(BundleContext context) throws Exception {
32                 super.start(context);
33                 plugin = this;
34                 cross = imageDescriptorFromPlugin(PLUGIN_ID, "icons/silk_small/cross.png");
35                 clock_red = imageDescriptorFromPlugin(PLUGIN_ID, "icons/silk_small/clock_red.png");
36         }
37
38         /*
39          * (non-Javadoc)
40          * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
41          */
42         public void stop(BundleContext context) throws Exception {
43                 plugin = null;
44                 super.stop(context);
45         }
46
47         /**
48          * Returns the shared instance
49          *
50          * @return the shared instance
51          */
52         public static Activator getDefault() {
53                 return plugin;
54         }
55
56 }