]> gerrit.simantics Code Review - simantics/platform.git/blob - 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
1 /*******************************************************************************\r
2  * Copyright (c) 2015, 2016 Association for Decentralized \r
3  * Information Management in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the THTH Simantics \r
6  * Division Member Component License which accompanies this \r
7  * distribution, and is available at\r
8  * http://www.simantics.org/legal/sdmcl-v10.html\r
9  *\r
10  * Contributors:\r
11  *     Semantum Oy - initial API and implementation\r
12  *******************************************************************************/
13 package org.simantics.document;\r
14 \r
15 import org.osgi.framework.BundleActivator;\r
16 import org.osgi.framework.BundleContext;\r
17 \r
18 public class Activator implements BundleActivator {\r
19 \r
20         private static BundleContext context;\r
21 \r
22         static BundleContext getContext() {\r
23                 return context;\r
24         }\r
25 \r
26         /*\r
27          * (non-Javadoc)\r
28          * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)\r
29          */\r
30         public void start(BundleContext bundleContext) throws Exception {\r
31                 Activator.context = bundleContext;\r
32         }\r
33 \r
34         /*\r
35          * (non-Javadoc)\r
36          * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)\r
37          */\r
38         public void stop(BundleContext bundleContext) throws Exception {\r
39                 Activator.context = null;\r
40         }\r
41 \r
42 }\r