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