1 /*******************************************************************************
2  * Copyright (c) 2009, 2017 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.equinox.internal.p2.tests.verifier;
15 
16 import org.osgi.framework.BundleActivator;
17 import org.osgi.framework.BundleContext;
18 
19 /**
20  * The activator class controls the plug-in life cycle
21  */
22 public class Activator implements BundleActivator {
23 
24 	// The plug-in ID
25 	public static final String PLUGIN_ID = "org.eclipse.equinox.p2.tests.verifier"; //$NON-NLS-1$
26 	private static BundleContext bundleContext;
27 
28 	/**
29 	 * The constructor
30 	 */
Activator()31 	public Activator() {
32 		// nothing interesting to do
33 	}
34 
35 	@Override
start(BundleContext context)36 	public void start(BundleContext context) throws Exception {
37 		bundleContext = context;
38 	}
39 
40 	@Override
stop(BundleContext context)41 	public void stop(BundleContext context) throws Exception {
42 		bundleContext = null;
43 	}
44 
45 	/*
46 	 * Return the bundle context or <code>null</code>.
47 	 */
getBundleContext()48 	public static BundleContext getBundleContext() {
49 		return bundleContext;
50 	}
51 
52 }
53