First submit for debug plugin
authorfvicente <fvicente>
Wed, 30 Jul 2003 00:49:03 +0000 (00:49 +0000)
committerfvicente <fvicente>
Wed, 30 Jul 2003 00:49:03 +0000 (00:49 +0000)
net.sourceforge.phpeclipse.debug.core/.classpath
net.sourceforge.phpeclipse.debug.core/plugin.xml
net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDebugCorePlugin.java

index e71a810..6798997 100644 (file)
@@ -34,6 +34,6 @@
     <classpathentry kind="src" path="/net.sourceforge.phpeclipse"/>
     <classpathentry kind="var"
         path="ECLIPSE_HOME/plugins/org.eclipse.core.boot_2.1.0/boot.jar" sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.core.boot_2.1.0/bootsrc.zip"/>
-    <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
+    <classpathentry kind="var" path="JRE_LIB" sourcepath="JRE_SRC"/>
     <classpathentry kind="output" path="bin"/>
 </classpath>
index a955c33..f2a5952 100644 (file)
@@ -9,7 +9,7 @@
    <runtime>
       <library name="core.jar">
          <export name="*"/>
-      </library>       
+      </library>
    </runtime>
    <requires>
       <import plugin="org.eclipse.ui"/>
       <import plugin="org.eclipse.debug.ui"/>
       <import plugin="org.junit"/>
       <import plugin="net.sourceforge.phpeclipse"/>
-   </requires>   
+   </requires>
+
+<!-- Extensions -->
+   <extension id="phpBreakpointMarker" point="org.eclipse.core.resources.markers">
+      <super type="org.eclipse.debug.core.breakpointMarker"/>
+   </extension>
+
+   <extension id="commonPHPLineBreakpointMarker" point="org.eclipse.core.resources.markers">
+      <super type="net.sourceforge.phpeclipse.debug.core.phpBreakpointMarker"/>
+      <super type="org.eclipse.debug.core.lineBreakpointMarker"/>
+      <persistent value="true"/>
+   </extension>
+
+   <extension id="phpLineBreakpointMarker" point="org.eclipse.core.resources.markers">
+      <super type="net.sourceforge.phpeclipse.debug.core.commonPHPLineBreakpointMarker"/>
+      <persistent value="true"/>
+   </extension>
+
+   <extension point="org.eclipse.debug.core.breakpoints">
+      <breakpoint
+            markerType="net.sourceforge.phpeclipse.debug.core.phpLineBreakpointMarker"
+            class="net.sourceforge.phpdt.internal.debug.core.breakpoints.PHPLineBreakpoint"
+            id="phpLineBreakpoint">
+      </breakpoint>
+   </extension>
 </plugin>
index e50fad3..038c3d4 100644 (file)
@@ -6,21 +6,34 @@ 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.*;
 
+/**
+ * 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 +50,25 @@ 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();
+       }
 }