blob: e750cc19c728a6454da55cb5e7e1540ed8c2f9cb [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
* 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:
* Zoltan Ujhelyi - initial API and implementation
*******************************************************************************/
package org.eclipse.viatra2.visualisation;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class VisualisationPlugin extends AbstractUIPlugin {
/**
* The plug-in ID
*/
public static final String PLUGIN_ID = "org.eclipse.viatra2.visualisation";
// The shared instance
private static VisualisationPlugin plugin;
private VisualisationManager manager;
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
* )
*/
public void start(BundleContext context) throws Exception {
super.start(context);
manager = new VisualisationManager();
plugin = this;
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
* )
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
manager = null;
super.stop(context);
}
/**
* Returns the shared instance
* @return the shared instance
*/
public static VisualisationPlugin getDefault() {
return plugin;
}
/**
* Returns a visualisation manager component that allows a central management of different visualisations
* @return the visualisation manager component
*/
public static VisualisationManager getVisualisationManager() {
return plugin.manager;
}
}