3.x RC1 compatibility
[phpeclipse.git] / net.sourceforge.phpeclipse.debug.core / src / net / sourceforge / phpdt / internal / debug / core / PHPDebugCorePlugin.java
index e50fad3..0e6f79f 100644 (file)
@@ -6,21 +6,35 @@ import org.eclipse.core.runtime.IPluginDescriptor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Plugin;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.*;
+import org.osgi.framework.BundleContext;
 
+/**
+ * The main plugin class to be used in the desktop.
+ */
 public class PHPDebugCorePlugin extends Plugin {
        public static final String PLUGIN_ID = "net.sourceforge.phpeclipse.debug.core"; //$NON-NLS-1$
-
+       //      The shared instance.
        protected static PHPDebugCorePlugin plugin;
 
+       /**
+        * The constructor.
+        */
        public PHPDebugCorePlugin(IPluginDescriptor descriptor) {
                super(descriptor);
                plugin = this;
        } 
 
+       /**
+        * Returns the shared instance.
+        */
        public static PHPDebugCorePlugin getDefault() {
                return plugin;
        }
 
+       /**
+        * Returns the workspace instance.
+        */
        public static IWorkspace getWorkspace() {
                return PHPeclipsePlugin.getWorkspace();
        }
@@ -37,4 +51,38 @@ public class PHPDebugCorePlugin extends Plugin {
        public static void log(Throwable e) {
                log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "PHPLaunchingPlugin.internalErrorOccurred", e)); //$NON-NLS-1$
        }
+
+       /**
+        * Convenience method which returns the unique identifier of this plugin.
+        */
+//     public static String getUniqueIdentifier() {
+//             if (getDefault() == null) {
+//                     // If the default instance is not yet initialized,
+//                     // return a static identifier. This identifier must
+//                     // match the plugin id defined in plugin.xml
+//                     return PLUGIN_ID;
+//             }
+//             return getDefault().getDescriptor().getUniqueIdentifier();
+//     }
+       
+       /**
+        * @see Plugin#shutdown()
+        */
+       public void shutdown() throws CoreException {
+               plugin = null;
+               super.shutdown();
+       }
+       /**
+        * This method is called upon plug-in activation
+        */
+       public void start(BundleContext context) throws Exception {
+               super.start(context);
+       }
+
+       /**
+        * This method is called when the plug-in is stopped
+        */
+       public void stop(BundleContext context) throws Exception {
+               super.stop(context);
+       }
 }