if (ev.getSource() instanceof CamelThread && (ev.getKind() == DebugEvent.TERMINATE || ev.getKind() == DebugEvent.RESUME)) {
// we are only interested in hit camel breakpoints
resetHighlightBreakpointNode();
} else {
if (ev.getSource() instanceof CamelThread) {
CamelThread thread = (CamelThread)ev.getSource();
if (ev.getKind() == DebugEvent.SUSPEND && ev.getDetail() == DebugEvent.BREAKPOINT) {
// a breakpoint was hit and thread is on suspend -> stack should be selected in tree now
try {
CamelStackFrame stackFrame = (CamelStackFrame)thread.getTopStackFrame();
if (stackFrame != null) highlightBreakpointNodeWithID(stackFrame.getEndpointId());
} catch (DebugException ex) {
Activator.getLogger().error(ex);
}
}