]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.backup.ontology/src/org/simantics/backup/ontology/Activator.java
f0090a6935a1e7b2566c0ce81a36b42e7e222b35
[simantics/platform.git] / bundles / org.simantics.backup.ontology / src / org / simantics / backup / ontology / Activator.java
1 package org.simantics.backup.ontology;\r
2 \r
3 import org.osgi.framework.BundleActivator;\r
4 import org.osgi.framework.BundleContext;\r
5 \r
6 public class Activator implements BundleActivator {\r
7 \r
8         private static BundleContext context;\r
9 \r
10         static BundleContext getContext() {\r
11                 return context;\r
12         }\r
13 \r
14         /*\r
15          * (non-Javadoc)\r
16          * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)\r
17          */\r
18         public void start(BundleContext bundleContext) throws Exception {\r
19                 Activator.context = bundleContext;\r
20         }\r
21 \r
22         /*\r
23          * (non-Javadoc)\r
24          * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)\r
25          */\r
26         public void stop(BundleContext bundleContext) throws Exception {\r
27                 Activator.context = null;\r
28         }\r
29 \r
30 }\r