*
*/
public IStackFrame[] getStackFrames () throws DebugException {
- return frames;
+ if (isSuspended()) {
+ return ((PHPDebugTarget)getDebugTarget()).getStackFrames();
+ } else {
+ return new IStackFrame[0];
+ }
}
public int getStackFramesSize () {
}
public IBreakpoint[] getBreakpoints() {
- return null;
+ return new IBreakpoint[0];
}
public String getModelIdentifier() {
state.setSuspended (false); // We will leave the suspended state
this.frames = null; // Reset the stackframes
- ev = new DebugEvent (this, DebugEvent.RESUME, de); // Create an event resume by stepping
+ ev = new DebugEvent (this, DebugEvent.RESUME, de); // Create an event resume by stepping
- DebugPlugin.getDefault ().fireDebugEventSet (new DebugEvent[] { ev }); // Fire the event
+ DebugPlugin.getDefault ().fireDebugEventSet (new DebugEvent[] { ev }); // Fire the event
}
/**
*/
public boolean canStepInto () {
return isSuspended () && // Is the thread in suspended mode (stopped)
- isStepping () && // and ???
+ isStepping () && // and ???
this.hasStackFrames (); // and does this thread have stack frames?
}
*/
public boolean canStepOver () {
return isSuspended () && // Is the thread in suspended mode (stopped)
- isStepping () && // and ???
+ isStepping () && // and ???
this.hasStackFrames (); // and does this thread have stack frames?
}
*/
public boolean canStepReturn () {
return isSuspended () && // Is the thread in suspended mode (stopped)
- isStepping () && // and ???
+ isStepping () && // and ???
this.hasStackFrames (); // and does this thread have stack frames?
}
state.setTerminated (true);
this.frames = null;
getDebugTarget ().terminate ();
+ fireTerminateEvent ();
}
/**
if (IWorkbenchAdapter.class.equals (arg0)) {
return new IWorkbenchAdapter() {
public Object[] getChildren(Object o) {
- Object[] children = null;
-
try {
- IStackFrame[] frames = getStackFrames();
-
- if (null != frames) {
- children = new Object[frames.length];
- for (int i = 0; i < frames.length; ++i) {
- children[i] = frames[i];
- }
- }
+ return getStackFrames ();
} catch (DebugException x) {
PHPeclipsePlugin.log ("Unable to get stack frames.", x);
}
- return children;
+ return new Object[0];
}
public ImageDescriptor getImageDescriptor(Object object) {
}
};
}
-
- return null;
+ return super.getAdapter(arg0);
}
/**