use of org.eclipse.che.ide.api.debug.BreakpointRenderer.LineChangeAction in project che by eclipse.
the class BreakpointManagerImpl method reAddBreakpointMark.
private void reAddBreakpointMark(BreakpointRenderer breakpointRenderer, Breakpoint breakpoint) {
int lineNumber = breakpoint.getLineNumber();
breakpointRenderer.addBreakpointMark(lineNumber, new LineChangeAction() {
@Override
public void onLineChange(VirtualFile file, int firstLine, int linesAdded, int linesRemoved) {
BreakpointManagerImpl.this.onLineChange(file, firstLine, linesAdded, linesRemoved);
}
});
breakpointRenderer.setBreakpointActive(lineNumber, breakpoint.isActive());
}
use of org.eclipse.che.ide.api.debug.BreakpointRenderer.LineChangeAction in project che by eclipse.
the class BreakpointManagerImpl method addBreakpoint.
/**
* Adds breakpoint to the list and JVM.
*/
private void addBreakpoint(final Breakpoint breakpoint) {
List<Breakpoint> pathBreakpoints = breakpoints.get(breakpoint.getPath());
if (pathBreakpoints == null) {
pathBreakpoints = new ArrayList<>();
breakpoints.put(breakpoint.getPath(), pathBreakpoints);
}
if (!pathBreakpoints.contains(breakpoint)) {
pathBreakpoints.add(breakpoint);
}
preserveBreakpoints();
final BreakpointRenderer breakpointRenderer = getBreakpointRendererForFile(breakpoint.getPath());
if (breakpointRenderer != null) {
breakpointRenderer.addBreakpointMark(breakpoint.getLineNumber(), new LineChangeAction() {
@Override
public void onLineChange(VirtualFile file, int firstLine, int linesAdded, int linesRemoved) {
BreakpointManagerImpl.this.onLineChange(file, firstLine, linesAdded, linesRemoved);
}
});
breakpointRenderer.setBreakpointActive(breakpoint.getLineNumber(), breakpoint.isActive());
}
for (BreakpointManagerObserver observer : observers) {
observer.onBreakpointAdded(breakpoint);
}
Debugger debugger = debuggerManager.getActiveDebugger();
if (debugger != null) {
debugger.addBreakpoint(breakpoint.getFile(), breakpoint.getLineNumber());
}
}
Aggregations