/******************************************************************************* | |
* Copyright (c) 2008, 2019 Mia-Software and others. | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v2.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v20.html | |
* | |
* Contributors: | |
* Gabriel Barbier (Mia-Software) - initial API and implementation | |
*******************************************************************************/ | |
package org.eclipse.modisco.infra.common.core.internal; | |
import org.eclipse.core.runtime.Plugin; | |
import org.osgi.framework.BundleContext; | |
/** | |
* The activator class controls the plug-in life cycle | |
* | |
* @author Gabriel Barbier | |
* | |
*/ | |
public class CommonModiscoActivator extends Plugin { | |
// The plug-in ID | |
public static final String PLUGIN_ID = "org.eclipse.modisco.infra.common.core"; //$NON-NLS-1$ | |
// The shared instance | |
private static CommonModiscoActivator plugin; | |
/* | |
* (non-Javadoc) | |
* | |
* @see | |
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext | |
* ) | |
*/ | |
@Override | |
public void start(final BundleContext context) throws Exception { | |
super.start(context); | |
CommonModiscoActivator.plugin = this; | |
} | |
/* | |
* (non-Javadoc) | |
* | |
* @see | |
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext | |
* ) | |
*/ | |
@Override | |
public void stop(final BundleContext context) throws Exception { | |
CommonModiscoActivator.plugin = null; | |
super.stop(context); | |
} | |
/** | |
* Returns the shared instance | |
* | |
* @return the shared instance | |
*/ | |
public static CommonModiscoActivator getDefault() { | |
return CommonModiscoActivator.plugin; | |
} | |
} |