/** * Creates a new breakpoint for given parameters. * * @param url a url * @param lineNumber a line number * @return a new breakpoint for given parameters */ public static LineBreakpoint create(String url, int lineNumber) { LineBreakpoint b = new LineBreakpointComparable(url); b.setLineNumber(lineNumber); b.setPrintText( NbBundle.getBundle(LineBreakpoint.class) .getString("CTL_Line_Breakpoint_Print_Text")); // NOI18N return b; }
public int compareTo(Object o) { if (o instanceof LineBreakpointComparable) { LineBreakpoint lbthis = this; LineBreakpoint lb = (LineBreakpoint) o; int uc = lbthis.getURL().compareTo(lb.getURL()); if (uc != 0) { return uc; } else { return lbthis.getLineNumber() - lb.getLineNumber(); } } else { return -1; } }