]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.workbench.search/src/org/simantics/workbench/search/Activator.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.workbench.search / src / org / simantics / workbench / search / Activator.java
1 package org.simantics.workbench.search;\r
2 \r
3 import org.osgi.framework.BundleActivator;\r
4 import org.osgi.framework.BundleContext;\r
5 \r
6 /**\r
7  * @author Tuukka Lehtonen\r
8  */\r
9 public class Activator implements BundleActivator {\r
10 \r
11     public static final String   PLUGIN_ID = "org.simantics.workbench.search";\r
12 \r
13         private static BundleContext context;\r
14 \r
15         static BundleContext getContext() {\r
16                 return context;\r
17         }\r
18 \r
19         /*\r
20          * (non-Javadoc)\r
21          * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)\r
22          */\r
23         public void start(BundleContext bundleContext) throws Exception {\r
24                 Activator.context = bundleContext;\r
25         }\r
26 \r
27         /*\r
28          * (non-Javadoc)\r
29          * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)\r
30          */\r
31         public void stop(BundleContext bundleContext) throws Exception {\r
32                 Activator.context = null;\r
33         }\r
34 \r
35 }\r