]> gerrit.simantics Code Review - simantics/python.git/blob - org.simantics.pythonlink/src/org/simantics/pythonlink/Activator.java
83633a4114c9282b0e86c65f06975681db66c6ae
[simantics/python.git] / org.simantics.pythonlink / src / org / simantics / pythonlink / Activator.java
1 package org.simantics.pythonlink;\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         System.loadLibrary("jnipython");\r
21         }\r
22 \r
23         /*\r
24          * (non-Javadoc)\r
25          * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)\r
26          */\r
27         public void stop(BundleContext bundleContext) throws Exception {\r
28                 Activator.context = null;\r
29         }\r
30 \r
31 }\r