package org.zend.php.zendserver.deployment.debug.core; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Plugin; import org.eclipse.core.runtime.Status; import org.osgi.framework.BundleContext; public class Activator extends Plugin { public static final String PLUGIN_ID = "org.zend.php.zendserver.deployment.debug.core"; //$NON-NLS-1$ public static final String AUTO_DEPLOY_EXTENSION_ID = "org.zend.php.zendserver.deployment.autoDeploy"; //$NON-NLS-1$ public static final String DEPLOYMENT_CONTRIBUTION_EXTENSION_ID = PLUGIN_ID + ".deploymentContribution"; //$NON-NLS-1$ private static BundleContext context; private static Activator plugin; static BundleContext getContext() { return context; } /* * (non-Javadoc) * * @see * org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext) */ public void start(BundleContext bundleContext) throws Exception { Activator.context = bundleContext; plugin = this; } /* * (non-Javadoc) * * @see * org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) */ public void stop(BundleContext bundleContext) throws Exception { Activator.context = null; plugin = null; DebugModeManager.stopAll(); } /** * Returns the shared instance * * @return the shared instance */ public static Activator getDefault() { return plugin; } public static void log(Throwable e) { getDefault().getLog().log( new Status(IStatus.ERROR, PLUGIN_ID, e.getMessage(), e)); } }