This commit was generated by cvs2svn to compensate for changes in r50,
[phpeclipse.git] / net.sourceforge.phpeclipse.debug.core / src / net / sourceforge / phpdt / internal / debug / core / PHPDebugCorePlugin.java
1 package net.sourceforge.phpdt.internal.debug.core;
2
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
10 public class PHPDebugCorePlugin extends Plugin {
11         public static final String PLUGIN_ID = "net.sourceforge.phpeclipse.debug.core"; //$NON-NLS-1$
12
13         protected static PHPDebugCorePlugin plugin;
14
15         public PHPDebugCorePlugin(IPluginDescriptor descriptor) {
16                 super(descriptor);
17                 plugin = this;
18         } 
19
20         public static PHPDebugCorePlugin getDefault() {
21                 return plugin;
22         }
23
24         public static IWorkspace getWorkspace() {
25                 return PHPeclipsePlugin.getWorkspace();
26         }
27         
28         public static void log(int severity, String message) {
29                 Status status = new Status(severity, PLUGIN_ID, IStatus.OK, message, null) ;
30                 PHPDebugCorePlugin.log(status) ;
31         }
32
33         public static void log(IStatus status) {
34                 getDefault().getLog().log(status);
35         }
36
37         public static void log(Throwable e) {
38                 log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "PHPLaunchingPlugin.internalErrorOccurred", e)); //$NON-NLS-1$
39         }
40 }