use of com.github.cameltooling.idea.runner.debugger.stack.CamelStackFrame in project camel-idea-plugin by camel-tooling.
the class CamelDebugProcess method init.
public void init() {
camelDebuggerSession.setXDebugSession(this.getSession());
camelDebuggerSession.connect(javaProcessHandler);
camelDebuggerSession.addMessageReceivedListener(new MessageReceivedListener() {
@Override
public void onNewMessageReceived(CamelMessageInfo camelMessageInfo) {
XSourcePosition topPosition = getSession().getTopFramePosition();
if (forceRefresh || topPosition == null || !topPosition.equals(camelMessageInfo.getXSourcePosition())) {
forceRefresh = false;
// List frames
List<CamelStackFrame> stackFrames = new ArrayList<CamelStackFrame>();
for (CamelMessageInfo info : camelMessageInfo.getStack()) {
CamelStackFrame nextFrame = new CamelStackFrame(getSession().getProject(), camelDebuggerSession, info);
stackFrames.add(nextFrame);
}
getSession().positionReached(new CamelSuspendContext(stackFrames.toArray(new CamelStackFrame[stackFrames.size()])));
}
}
});
}
Aggregations