reduce warnings due to core.runtime deprecations
[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.IStatus;
6 import org.eclipse.core.runtime.Plugin;
7 import org.eclipse.core.runtime.Status;
8 //import org.eclipse.core.runtime.*;
9 import org.osgi.framework.BundleContext;
10
11 /**
12  * The main plugin class to be used in the desktop.
13  */
14 public class PHPDebugCorePlugin extends Plugin {
15         public static final String PLUGIN_ID = "net.sourceforge.phpeclipse.debug.core"; //$NON-NLS-1$
16         //      The shared instance.
17         protected static PHPDebugCorePlugin plugin;
18
19         /**
20          * The constructor.
21          */
22         public PHPDebugCorePlugin() {
23                 super();
24                 plugin = this;
25         } 
26
27         /**
28          * Returns the shared instance.
29          */
30         public static PHPDebugCorePlugin getDefault() {
31                 return plugin;
32         }
33
34         /**
35          * Returns the workspace instance.
36          */
37         public static IWorkspace getWorkspace() {
38                 return PHPeclipsePlugin.getWorkspace();
39         }
40         
41         public static void log(int severity, String message) {
42                 Status status = new Status(severity, PLUGIN_ID, IStatus.OK, message, null) ;
43                 PHPDebugCorePlugin.log(status) ;
44         }
45
46         public static void log(IStatus status) {
47                 getDefault().getLog().log(status);
48         }
49
50         public static void log(Throwable e) {
51                 log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "PHPLaunchingPlugin.internalErrorOccurred", e)); //$NON-NLS-1$
52         }
53
54         /**
55          * Convenience method which returns the unique identifier of this plugin.
56          */
57         public static String getUniqueIdentifier() {
58                 return PLUGIN_ID;
59         }
60         
61         /**
62          * @see Plugin#shutdown()
63          */
64 /*      public void shutdown() throws CoreException {
65                 plugin = null;
66                 super.shutdown();
67         }
68 */      
69         /**
70          * This method is called upon plug-in activation
71          */
72         public void start(BundleContext context) throws Exception {
73                 super.start(context);
74         }
75
76         /**
77          * This method is called when the plug-in is stopped
78          */
79         public void stop(BundleContext context) throws Exception {
80                 plugin=null;
81                 super.stop(context);
82         }
83 }