3.x RC1 compatibility
[phpeclipse.git] / net.sourceforge.phpeclipse.launching / src / net / sourceforge / phpdt / internal / launching / PHPLaunchingPlugin.java
1 package net.sourceforge.phpdt.internal.launching;
2
3 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
4
5 import org.eclipse.core.resources.IWorkspace;
6 import org.eclipse.core.runtime.IPluginDescriptor;
7 import org.eclipse.core.runtime.IStatus;
8 import org.eclipse.core.runtime.Status;
9 import org.eclipse.ui.plugin.AbstractUIPlugin;
10 import org.osgi.framework.BundleContext;
11
12 public class PHPLaunchingPlugin extends AbstractUIPlugin {
13         public static final String PLUGIN_ID = "net.sourceforge.phpeclipse.launching"; //$NON-NLS-1$
14
15         protected static PHPLaunchingPlugin plugin;
16
17         public PHPLaunchingPlugin(IPluginDescriptor descriptor) {
18                 super(descriptor);
19                 plugin = this;
20         }
21
22         public static PHPLaunchingPlugin getDefault() {
23                 return plugin;
24         }
25
26         public static IWorkspace getWorkspace() {
27                 return PHPeclipsePlugin.getWorkspace();
28         }
29
30         public static void log(IStatus status) {
31                 getDefault().getLog().log(status);
32         }
33
34         public static void log(Throwable e) {
35                 log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, PHPLaunchingMessages.getString("PHPLaunchingPlugin.internalErrorOccurred"), e)); //$NON-NLS-1$
36         }
37         /**
38          * This method is called upon plug-in activation
39          */
40         public void start(BundleContext context) throws Exception {
41                 super.start(context);
42         }
43
44         /**
45          * This method is called when the plug-in is stopped
46          */
47         public void stop(BundleContext context) throws Exception {
48                 super.stop(context);
49         }
50 }