/*******************************************************************************
* This file is protected by Copyright.
* Please refer to the COPYRIGHT file distributed with this source distribution.
*
* This file is part of REDHAWK IDE.
*
* 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
*******************************************************************************/
package gov.redhawk.ide.sad.ui;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
public class SadUiActivator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "gov.redhawk.ide.sad.ui";
// The shared instance
private static SadUiActivator plugin;
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
* )
*/
@Override
public void start(final BundleContext context) throws Exception {
super.start(context);
SadUiActivator.plugin = this;
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
* )
*/
@Override
public void stop(final BundleContext context) throws Exception {
SadUiActivator.plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static SadUiActivator getDefault() {
return SadUiActivator.plugin;
}
/**
* @return
*/
public static String getPluginId() {
return SadUiActivator.getDefault().getBundle().getSymbolicName();
}
/**
* Logging functionality
*
* @param msg
* @param e
* @since 1.2
*/
public static final void logError(final String msg, final Throwable e) {
SadUiActivator.getDefault().getLog().log(new Status(IStatus.ERROR, SadUiActivator.PLUGIN_ID, msg, e));
}
}