| /******************************************************************************* |
| * 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 v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * 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; |
| } |
| } |