]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.rest/src/org/simantics/scl/rest/Activator.java
Dirty hack to get CHR ruleset resolved before functions using them
[simantics/platform.git] / bundles / org.simantics.scl.rest / src / org / simantics / scl / rest / Activator.java
1 package org.simantics.scl.rest;
2
3 import org.osgi.framework.BundleActivator;
4 import org.osgi.framework.BundleContext;
5
6 public class Activator implements BundleActivator {
7
8     private static BundleContext context;
9
10     static BundleContext getContext() {
11         return context;
12     }
13
14     /*
15      * (non-Javadoc)
16      * 
17      * @see
18      * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
19      */
20     public void start(BundleContext bundleContext) throws Exception {
21         Activator.context = bundleContext;
22     }
23
24     /*
25      * (non-Javadoc)
26      * 
27      * @see
28      * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
29      */
30     public void stop(BundleContext bundleContext) throws Exception {
31         SCLRESTServer.stop();
32         Activator.context = null;
33     }
34
35 }