]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.filesystem.services/src/org/simantics/filesystem/services/internal/Activator.java
Added org.simantics.filesystem.services
[simantics/platform.git] / bundles / org.simantics.filesystem.services / src / org / simantics / filesystem / services / internal / Activator.java
diff --git a/bundles/org.simantics.filesystem.services/src/org/simantics/filesystem/services/internal/Activator.java b/bundles/org.simantics.filesystem.services/src/org/simantics/filesystem/services/internal/Activator.java
new file mode 100644 (file)
index 0000000..e84fdbc
--- /dev/null
@@ -0,0 +1,34 @@
+package org.simantics.filesystem.services.internal;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Tuukka Lehtonen
+ * @since 1.31.0
+ */
+public class Activator implements BundleActivator {
+
+       private static BundleContext context;
+
+       static BundleContext getContext() {
+               return context;
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+        */
+       public void start(BundleContext bundleContext) throws Exception {
+               Activator.context = bundleContext;
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+        */
+       public void stop(BundleContext bundleContext) throws Exception {
+               Activator.context = null;
+       }
+
+}
\ No newline at end of file