*
*/
public IStackFrame[] getStackFrames () throws DebugException {
- return frames;
+ if (isSuspended()) {
+ return ((PHPDebugTarget)getDebugTarget()).getStackFrames();
+ } else {
+ return new IStackFrame[0];
+ }
}
public int getStackFramesSize () {
this.frames = null; // Reset the stackframes
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
}
/**
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);
}
/**