| package org.eclipse.stem.definitions.transport.provider; |
| |
| /******************************************************************************* |
| * Copyright (c) 2011 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 API and implementation |
| *******************************************************************************/ |
| import org.eclipse.core.runtime.Platform; |
| import org.eclipse.emf.common.EMFPlugin; |
| |
| import org.eclipse.emf.common.util.ResourceLocator; |
| |
| import org.eclipse.emf.ecore.provider.EcoreEditPlugin; |
| |
| import org.eclipse.stem.core.common.provider.CoreEditPlugin; |
| |
| import org.eclipse.stem.definitions.edges.provider.DefinitionsEditPlugin; |
| import org.osgi.framework.Bundle; |
| |
| /** |
| * This is the central singleton for the Transport edit plugin. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public final class TransportEditPlugin extends EMFPlugin { |
| |
| private static String TRANSPORT_UI_BUNDLE = "org.eclipse.stem.ui.transport"; |
| |
| /** |
| * Keep track of the singleton. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final TransportEditPlugin INSTANCE = new TransportEditPlugin(); |
| |
| /** |
| * Keep track of the singleton. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private static Implementation plugin; |
| |
| /** |
| * Create the instance. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public TransportEditPlugin() { |
| super |
| (new ResourceLocator [] { |
| DefinitionsEditPlugin.INSTANCE, |
| CoreEditPlugin.INSTANCE, |
| EcoreEditPlugin.INSTANCE, |
| }); |
| } |
| |
| /** |
| * Returns the singleton instance of the Eclipse plugin. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @return the singleton instance. |
| * @generated |
| */ |
| @Override |
| public ResourceLocator getPluginResourceLocator() { |
| return plugin; |
| } |
| |
| /** |
| * Returns the singleton instance of the Eclipse plugin. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @return the singleton instance. |
| * @generated |
| */ |
| public static Implementation getPlugin() { |
| return plugin; |
| } |
| |
| /** |
| * The actual implementation of the Eclipse <b>Plugin</b>. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static class Implementation extends EclipsePlugin { |
| /** |
| * Creates an instance. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated NOT |
| */ |
| public Implementation() { |
| super(); |
| |
| // Remember the static instance. |
| // |
| plugin = this; |
| |
| // We need to start the ui plugin here to make sure to register the new graph generator in the UI |
| |
| Bundle uiBundle = Platform.getBundle(TRANSPORT_UI_BUNDLE); |
| if (uiBundle != null) { |
| try { |
| uiBundle.start(Bundle.START_TRANSIENT); |
| } catch(Exception e) { |
| e.printStackTrace(); |
| } |
| } |
| } |
| } |
| |
| } |