use of org.eclipse.wst.xsl.launching.model.XSLStackFrame in project webtools.sourceediting by eclipse.
the class JAXPDebugTarget method getStackFrames.
/**
* Returns the current stack frames in the target.
*/
public IStackFrame[] getStackFrames() throws DebugException {
synchronized (STACK_FRAMES_LOCK) {
if (stale) {
stale = false;
String framesData = sendRequest(DebugConstants.REQUEST_STACK);
// $NON-NLS-1$
String[] frames = framesData.split("\\$\\$\\$");
IStackFrame[] sf = new IStackFrame[frames.length];
List<IStackFrame> currentFrames = Arrays.asList(stackFramesCache);
for (int i = 0; i < frames.length; i++) {
String data = frames[i];
XSLStackFrame frame = new XSLStackFrame(thread, data, i);
int index;
if ((index = currentFrames.indexOf(frame)) != -1) {
XSLStackFrame curr = (XSLStackFrame) currentFrames.get(index);
curr.setLineNumber(frame.getLineNumber());
curr.setVariables(frame.getVariables());
frame = curr;
}
sf[frames.length - i - 1] = frame;
}
stackFramesCache = sf;
}
return stackFramesCache;
}
}
Aggregations