Importing the XDebugProxy code in the HEAD. The repo was tagged with T_BEFORE_XDEBUGP...
[phpeclipse.git] / net.sourceforge.phpeclipse.xdebug.core / src / net / sourceforge / phpeclipse / xdebug / php / model / XDebugElement.java
index 7242bd4..b103f17 100644 (file)
@@ -3,7 +3,8 @@
  */
 package net.sourceforge.phpeclipse.xdebug.php.model;
 
-import net.sourceforge.phpeclipse.xdebug.core.ResponseData;
+
+
 import net.sourceforge.phpeclipse.xdebug.php.launching.IXDebugConstants;
 
 import org.eclipse.core.runtime.PlatformObject;
@@ -16,53 +17,51 @@ import org.eclipse.debug.core.model.IDebugTarget;
 
 /**
  * @author Christian
- * 
+ *
  */
 public class XDebugElement extends PlatformObject implements IDebugElement {
-
-       // containing target
+       
+       // containing target 
        protected XDebugTarget fTarget;
-
+       
        /**
-        * Constructs a new debug element contained in the given debug target.
+        * Constructs a new debug element contained in the given
+        * debug target.
         * 
-        * @param target
-        *            debug target (PDA VM)
+        * @param target debug target (PDA VM)
         */
        public XDebugElement(XDebugTarget target) {
                fTarget = target;
        }
-
-       /*
-        * (non-Javadoc)
-        * 
+       
+       public XDebugElement() {
+               fTarget = null;
+       }
+       
+       /* (non-Javadoc)
         * @see org.eclipse.debug.core.model.IDebugElement#getModelIdentifier()
         */
        public String getModelIdentifier() {
                return IXDebugConstants.ID_PHP_DEBUG_MODEL;
        }
-
-       /*
-        * (non-Javadoc)
-        * 
+       /* (non-Javadoc)
         * @see org.eclipse.debug.core.model.IDebugElement#getDebugTarget()
         */
        public IDebugTarget getDebugTarget() {
                return fTarget;
        }
+       
+       public void setDebugTarget(XDebugTarget target) {
+               fTarget=target;
+       }
 
-       /*
-        * (non-Javadoc)
-        * 
+       /* (non-Javadoc)
         * @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
         */
        public ILaunch getLaunch() {
                return getDebugTarget().getLaunch();
        }
-
-       /*
-        * (non-Javadoc)
-        * 
+       /* (non-Javadoc)
         * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
         */
        public Object getAdapter(Class adapter) {
@@ -71,65 +70,56 @@ public class XDebugElement extends PlatformObject implements IDebugElement {
                }
                return super.getAdapter(adapter);
        }
-
+       
        protected void abort(String message, Throwable e) throws DebugException {
-               /*
-                * Axel auskommentiert throw new DebugException(new
-                * Status(IStatus.ERROR,
-                * DebugExamplesPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
-                * DebugPlugin.INTERNAL_ERROR, message, e));
-                */
-       }
-
+/*     Axel auskommentiert
+               throw new DebugException(new Status(IStatus.ERROR, DebugExamplesPlugin.getDefault().getDescriptor().getUniqueIdentifier(), 
+                               DebugPlugin.INTERNAL_ERROR, message, e));
+*/
+               }
+       
        /**
         * Fires a debug event
         * 
-        * @param event
-        *            the event to be fired
+        * @param event the event to be fired
         */
        protected void fireEvent(DebugEvent event) {
-               DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] { event });
+               DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] {event});
        }
-
+       
        /**
         * Fires a <code>CREATE</code> event for this element.
         */
        public void fireCreationEvent() {
                fireEvent(new DebugEvent(this, DebugEvent.CREATE));
-       }
-
+       }       
+       
        /**
-        * Fires a <code>RESUME</code> event for this element with the given
-        * detail.
+        * Fires a <code>RESUME</code> event for this element with
+        * the given detail.
         * 
-        * @param detail
-        *            event detail code
+        * @param detail event detail code
         */
        public void fireResumeEvent(int detail) {
                fireEvent(new DebugEvent(this, DebugEvent.RESUME, detail));
        }
 
        /**
-        * Fires a <code>SUSPEND</code> event for this element with the given
-        * detail.
+        * Fires a <code>SUSPEND</code> event for this element with
+        * the given detail.
         * 
-        * @param detail
-        *            event detail code
+        * @param detail event detail code
         */
        public void fireSuspendEvent(int detail) {
                fireEvent(new DebugEvent(this, DebugEvent.SUSPEND, detail));
        }
-
+       
        /**
         * Fires a <code>TERMINATE</code> event for this element.
         */
        protected void fireTerminateEvent() {
                fireEvent(new DebugEvent(this, DebugEvent.TERMINATE));
        }
+       
 
-       public void fireDebugResponseEvent(ResponseData data) {
-               DebugEvent de = new DebugEvent(this, DebugEvent.MODEL_SPECIFIC);
-               de.setData(data);
-               fireEvent(de);
-       }
 }
\ No newline at end of file