blob: 162d58dd19ec6515732dde2318459823f6626703 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2015 RCP Vision (http://www.rcp-vision.com) 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:
* Vincenzo Caselli - Initial contribution and API
*******************************************************************************/
package org.eclipse.emf.parsley.web.tools;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* Plug-in Activator
*
* @author Vincenzo Caselli
*
*/
public class Activator extends AbstractUIPlugin {
public static final String PLUGIN_ID = "org.eclipse.emf.parsley.web.tools"; //$NON-NLS-1$
private static Activator plugin;
public Activator() {
}
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
public static Activator getDefault() {
return plugin;
}
public static IStatus createErrorStatus(final String msg) {
return createErrorStatus(msg, null);
}
public static IStatus createErrorStatus(final String msg, final Exception e) {
return new Status(IStatus.ERROR, PLUGIN_ID, 0, msg, e);
}
}