2 * Created on 23.11.2004
4 * TODO To change the template for this generated file go to
5 * Window - Preferences - Java - Code Style - Code Templates
7 package net.sourceforge.phpeclipse.xdebug.core;
9 import org.eclipse.core.runtime.PlatformObject;
10 import org.eclipse.debug.core.DebugEvent;
11 import org.eclipse.debug.core.DebugException;
12 import org.eclipse.debug.core.DebugPlugin;
13 import org.eclipse.debug.core.ILaunch;
14 import org.eclipse.debug.core.model.IDebugElement;
15 import org.eclipse.debug.core.model.IDebugTarget;
20 * TODO To change the template for this generated type comment go to
21 * Window - Preferences - Java - Code Style - Code Templates
23 public abstract class XDebugElement extends PlatformObject implements IDebugElement {
26 protected XDebugTarget fTarget;
29 * Constructs a new debug element contained in the given
32 * @param target debug target (PDA VM)
34 public XDebugElement(XDebugTarget target) {
39 * @see org.eclipse.debug.core.model.IDebugElement#getModelIdentifier()
41 public String getModelIdentifier() {
42 // return IPDAConstants.ID_PDA_DEBUG_MODEL;
46 * @see org.eclipse.debug.core.model.IDebugElement#getDebugTarget()
48 public IDebugTarget getDebugTarget() {
52 * @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
54 public ILaunch getLaunch() {
55 return getDebugTarget().getLaunch();
58 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
60 public Object getAdapter(Class adapter) {
61 if (adapter == IDebugElement.class) {
64 return super.getAdapter(adapter);
67 protected void abort(String message, Throwable e) throws DebugException {
68 /* Axel auskommentiert
69 throw new DebugException(new Status(IStatus.ERROR, DebugExamplesPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
70 DebugPlugin.INTERNAL_ERROR, message, e));
77 * @param event the event to be fired
79 protected void fireEvent(DebugEvent event) {
80 DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] {event});
84 * Fires a <code>CREATE</code> event for this element.
86 protected void fireCreationEvent() {
87 fireEvent(new DebugEvent(this, DebugEvent.CREATE));
91 * Fires a <code>RESUME</code> event for this element with
94 * @param detail event detail code
96 public void fireResumeEvent(int detail) {
97 fireEvent(new DebugEvent(this, DebugEvent.RESUME, detail));
101 * Fires a <code>SUSPEND</code> event for this element with
104 * @param detail event detail code
106 public void fireSuspendEvent(int detail) {
107 fireEvent(new DebugEvent(this, DebugEvent.SUSPEND, detail));
111 * Fires a <code>TERMINATE</code> event for this element.
113 protected void fireTerminateEvent() {
114 fireEvent(new DebugEvent(this, DebugEvent.TERMINATE));