blob: b681a9e73651488b088560a144b53c7b51282c16 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2013 Christian Pontesegger 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:
* Christian Pontesegger - initial API and implementation
*******************************************************************************/
package org.eclipse.ease.ui.scripts;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin {
public static final String PLUGIN_ID = "org.eclipse.ease.ui.scripts";
private static Activator fInstance;
public static Activator getDefault() {
return fInstance;
}
@Override
public void start(final BundleContext context) throws Exception {
super.start(context);
fInstance = this;
}
@Override
public void stop(final BundleContext context) throws Exception {
fInstance = null;
super.stop(context);
}
/**
* Returns an image descriptor for the image file at the given plug-in relative path
*
* @param path
* the path
* @return the image descriptor
*/
public static ImageDescriptor getImageDescriptor(final String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
}
public static IEclipsePreferences getPrefsNode() {
return InstanceScope.INSTANCE.getNode(PLUGIN_ID);
}
}