]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.document/src/org/simantics/document/Activator.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.document / src / org / simantics / document / Activator.java
diff --git a/bundles/org.simantics.document/src/org/simantics/document/Activator.java b/bundles/org.simantics.document/src/org/simantics/document/Activator.java
new file mode 100644 (file)
index 0000000..e948057
--- /dev/null
@@ -0,0 +1,42 @@
+/*******************************************************************************\r
+ * Copyright (c) 2015, 2016 Association for Decentralized \r
+ * Information Management in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the THTH Simantics \r
+ * Division Member Component License which accompanies this \r
+ * distribution, and is available at\r
+ * http://www.simantics.org/legal/sdmcl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Semantum Oy - initial API and implementation\r
+ *******************************************************************************/
+package org.simantics.document;\r
+\r
+import org.osgi.framework.BundleActivator;\r
+import org.osgi.framework.BundleContext;\r
+\r
+public class Activator implements BundleActivator {\r
+\r
+       private static BundleContext context;\r
+\r
+       static BundleContext getContext() {\r
+               return context;\r
+       }\r
+\r
+       /*\r
+        * (non-Javadoc)\r
+        * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)\r
+        */\r
+       public void start(BundleContext bundleContext) throws Exception {\r
+               Activator.context = bundleContext;\r
+       }\r
+\r
+       /*\r
+        * (non-Javadoc)\r
+        * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)\r
+        */\r
+       public void stop(BundleContext bundleContext) throws Exception {\r
+               Activator.context = null;\r
+       }\r
+\r
+}\r