]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.impl/src/org/simantics/db/impl/Activator.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.db.impl / src / org / simantics / db / impl / Activator.java
1 package org.simantics.db.impl;\r
2 \r
3 import org.eclipse.core.runtime.Plugin;\r
4 import org.osgi.framework.BundleContext;\r
5 import org.simantics.db.DevelopmentKeys;\r
6 \r
7 \r
8 public class Activator extends Plugin {\r
9 \r
10     // The plug-in ID\r
11     public static final String BUNDLE_ID = "org.simantics.db.impl"; //$NON-NLS-1$\r
12 \r
13     // The shared instance\r
14     private static Activator plugin;\r
15 \r
16     /**\r
17      * The constructor\r
18      */\r
19     public Activator() {\r
20     }\r
21 \r
22     /*\r
23      * (non-Javadoc)\r
24      * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)\r
25      */\r
26     @Override\r
27     public void start(BundleContext context) throws Exception {\r
28         super.start(context);\r
29         plugin = this;\r
30 \r
31         // Make sure development debug key values are initialized if in development mode.\r
32         DevelopmentKeys.initialize();\r
33     }\r
34 \r
35     /*\r
36      * (non-Javadoc)\r
37      * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)\r
38      */\r
39     @Override\r
40     public void stop(BundleContext context) throws Exception {\r
41         plugin = null;\r
42         super.stop(context);\r
43     }\r
44 \r
45     /**\r
46      * Returns the shared instance\r
47      *\r
48      * @return the shared instance\r
49      */\r
50     public static Activator getDefault() {\r
51         return plugin;\r
52     }\r
53 \r
54 }