예제 #1
0
 /**
  * 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;
 }
예제 #2
0
 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;
   }
 }