1 package net.sourceforge.phpdt.internal.debug.core;
3 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
4 import org.eclipse.core.resources.IWorkspace;
5 import org.eclipse.core.runtime.IPluginDescriptor;
6 import org.eclipse.core.runtime.IStatus;
7 import org.eclipse.core.runtime.Plugin;
8 import org.eclipse.core.runtime.Status;
9 import org.eclipse.core.runtime.*;
10 import org.osgi.framework.BundleContext;
13 * The main plugin class to be used in the desktop.
15 public class PHPDebugCorePlugin extends Plugin {
16 public static final String PLUGIN_ID = "net.sourceforge.phpeclipse.debug.core"; //$NON-NLS-1$
17 // The shared instance.
18 protected static PHPDebugCorePlugin plugin;
23 public PHPDebugCorePlugin(IPluginDescriptor descriptor) {
29 * Returns the shared instance.
31 public static PHPDebugCorePlugin getDefault() {
36 * Returns the workspace instance.
38 public static IWorkspace getWorkspace() {
39 return PHPeclipsePlugin.getWorkspace();
42 public static void log(int severity, String message) {
43 Status status = new Status(severity, PLUGIN_ID, IStatus.OK, message, null) ;
44 PHPDebugCorePlugin.log(status) ;
47 public static void log(IStatus status) {
48 getDefault().getLog().log(status);
51 public static void log(Throwable e) {
52 log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "PHPLaunchingPlugin.internalErrorOccurred", e)); //$NON-NLS-1$
56 * Convenience method which returns the unique identifier of this plugin.
58 // public static String getUniqueIdentifier() {
59 // if (getDefault() == null) {
60 // // If the default instance is not yet initialized,
61 // // return a static identifier. This identifier must
62 // // match the plugin id defined in plugin.xml
65 // return getDefault().getDescriptor().getUniqueIdentifier();
69 * @see Plugin#shutdown()
71 public void shutdown() throws CoreException {
76 * This method is called upon plug-in activation
78 public void start(BundleContext context) throws Exception {
83 * This method is called when the plug-in is stopped
85 public void stop(BundleContext context) throws Exception {