blob: 01ceed7a4b3ea501bab3ba920b374e5a61055410 [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2019 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*/
package org.eclipse.osbp.license;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The OSBP Application Wizard Activator.
*/
public class Activator extends AbstractUIPlugin {
private static BundleContext context;
private static Activator INSTANCE;
/**
* @return the context for this bundle
*/
static BundleContext getContext() {
return context;
}
/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
@Override
public void start(BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
INSTANCE = this;
}
/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
@Override
public void stop(BundleContext bundleContext) throws Exception {
Activator.context = null;
INSTANCE = null;
}
/**
* @return single instance of Activator
*/
public static Activator getInstance() {
return INSTANCE;
}
}