/** * Finds the breakpoint at the given file and line * * @param file * @param line * @return the breakpoint */ @Override public BumpBreakpoint findBreakpoint(File file, int line) { for (BumpBreakpoint bb : bump_client.getBreakpoints(file)) { int lno = bb.getIntProperty("LINE"); if (lno == line) { return bb; } } return null; }
/** * Toggle a line breakpoint for the given file. If a line breakpoint already exists at this line * it is removed; otherwise a new breakpoint is created with the current default settings. */ @Override public void toggleBreakpoint(String proj, File file, int line, BumpBreakMode mode) { if (line == 0 || file == null) return; String cls = null; boolean fnd = false; for (BumpBreakpoint bb : bump_client.getBreakpoints(file)) { int lno = bb.getIntProperty("LINE"); if (lno == line) { cls = bb.getProperty("CLASS"); fnd = true; } } if (fnd) clearLineBreakpoint(proj, file, cls, line); else addLineBreakpoint(proj, file, cls, line, mode); }