blob: 80a554acd636ad5a975e3787292281a51183c659 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2010 Mia-Software.
* 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:
* Fabien Giquel - initial API and implementation
*******************************************************************************/
package org.eclipse.modisco.infra.discovery.core.internal;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
public class Activator extends Plugin {
private static Activator plugin;
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return Activator.plugin;
}
/*
* (non-Javadoc)
*
* @see
* org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext
* )
*/
@Override
public void start(final BundleContext bundleContext) throws Exception {
super.start(bundleContext);
Activator.plugin = this;
}
/*
* (non-Javadoc)
*
* @see
* org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
@Override
public void stop(final BundleContext bundleContext) throws Exception {
super.stop(bundleContext);
Activator.plugin = null;
}
}