blob: 7fe507fabb7b8d37d2a561c54a12f2ba72e2688b [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2011-2012 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Snjezana Peco (Red Hat, Inc.) - initial API and implementation
******************************************************************************/
package org.eclipse.m2e.wtp.jsf.internal;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
*
* @author snjeza
*
*/
public class MavenJSFActivator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.m2e.wtp.jsf"; //$NON-NLS-1$
private static BundleContext context;
// The shared instance
private static MavenJSFActivator plugin;
static BundleContext getContext() {
return context;
}
/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext bundleContext) throws Exception {
super.start(bundleContext);
MavenJSFActivator.plugin = this;
MavenJSFActivator.context = bundleContext;
}
/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext bundleContext) throws Exception {
MavenJSFActivator.context = null;
MavenJSFActivator.plugin = null;
super.stop(bundleContext);
}
public static MavenJSFActivator getDefault() {
return plugin;
}
}