| /******************************************************************************* |
| * Copyright (c) 2012 Ericsson AB 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 |
| * |
| * Description: |
| * |
| * Contributors: |
| * Miles Parker, Tasktop Technologies - Initial API and Implementation |
| *******************************************************************************/ |
| package org.eclipse.mylyn.internal.reviews.example.emftasks.ui; |
| |
| import org.eclipse.ui.plugin.AbstractUIPlugin; |
| import org.osgi.framework.BundleContext; |
| |
| /** |
| * The activator class controls the plug-in life cycle. |
| * |
| * @author Miles Parker |
| */ |
| public class EmfExampleUiPlugin extends AbstractUIPlugin { |
| |
| public static final String PLUGIN_ID = "org.eclipse.mylyn.reviews.example.emftasks.connector.ui"; //$NON-NLS-1$ |
| |
| private static EmfExampleUiPlugin plugin; |
| |
| private EmfExampleConnectorUi ui; |
| |
| public EmfExampleUiPlugin() { |
| } |
| |
| @Override |
| public void start(BundleContext context) throws Exception { |
| super.start(context); |
| plugin = this; |
| } |
| |
| @Override |
| public void stop(BundleContext context) throws Exception { |
| plugin = null; |
| super.stop(context); |
| } |
| |
| /** |
| * Returns the shared instance. |
| * |
| * @return the shared instance |
| */ |
| public static EmfExampleUiPlugin getDefault() { |
| return plugin; |
| } |
| |
| public EmfExampleConnectorUi getConnectorUi() { |
| if (ui == null) { |
| ui = new EmfExampleConnectorUi(); |
| } |
| return ui; |
| } |
| } |