| /******************************************************************************* |
| * Copyright (c) 2005, 2009 IBM Corporation and others. |
| * 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: |
| * IBM Corporation - initial implementation |
| *******************************************************************************/ |
| package org.eclipse.epf.common.service; |
| |
| import org.eclipse.epf.common.AbstractActivator; |
| import org.osgi.framework.BundleContext; |
| |
| /** |
| * The activator class controls the plug-in life cycle |
| */ |
| public class ServicePlugin extends AbstractActivator { |
| |
| // The shared plug-in instance. |
| private static ServicePlugin plugin; |
| |
| /** |
| * Creates a new instance. |
| */ |
| public ServicePlugin() { |
| super(); |
| plugin = this; |
| } |
| |
| /** |
| * @see org.eclipse.epf.common.plugin.AbstractPlugin#start(org.osgi.framework.BundleContext) |
| */ |
| public void start(BundleContext context) throws Exception { |
| super.start(context); |
| } |
| |
| /** |
| * @see org.eclipse.epf.common.plugin.AbstractPlugin#stop(org.osgi.framework.BundleContext) |
| */ |
| public void stop(BundleContext context) throws Exception { |
| super.stop(context); |
| plugin = null; |
| } |
| |
| /** |
| * Gets the shared instance. |
| * |
| * @return the shared plug-in instance |
| */ |
| public static ServicePlugin getDefault() { |
| return plugin; |
| } |
| |
| } |