]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db/src/org/simantics/db/internal/Activator.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.db / src / org / simantics / db / internal / Activator.java
1 package org.simantics.db.internal;\r
2 \r
3 import org.eclipse.core.runtime.Plugin;\r
4 import org.osgi.framework.BundleContext;\r
5 \r
6 public class Activator extends Plugin {\r
7 \r
8     // The plug-in ID\r
9     public static final String PLUGIN_ID = "org.simantics.db";\r
10 \r
11     private static Activator activator;\r
12 \r
13     private static BundleContext context;\r
14 \r
15     @Override\r
16     public void start(BundleContext context) throws Exception {\r
17         activator = this;\r
18         Activator.context = context;\r
19         super.start(context);\r
20     }\r
21 \r
22     @Override\r
23     public void stop(BundleContext context) throws Exception {\r
24         super.stop(context);\r
25         Activator.context = null;\r
26         activator = null;\r
27     }\r
28 \r
29     public static Activator getDefault() {\r
30         return activator;\r
31     }\r
32     \r
33     public static BundleContext getContext() {\r
34         return context;\r
35     }\r
36 \r
37 }\r