public void registerBreakpoint(XLineBreakpointImpl breakpoint, final boolean initUI) {
   if (initUI) {
     breakpoint.updateUI();
   }
   Document document = breakpoint.getDocument();
   if (document != null) {
     myBreakpoints.put(breakpoint, document);
   }
 }
 public void breakpointChanged(final XLineBreakpointImpl breakpoint) {
   if (ApplicationManager.getApplication().isDispatchThread()) {
     breakpoint.updateUI();
   } else {
     queueBreakpointUpdate(breakpoint);
   }
 }
  private void updateBreakpoints(@NotNull Document document) {
    Collection<XLineBreakpointImpl> breakpoints = myBreakpoints.getKeysByValue(document);
    if (breakpoints == null) {
      return;
    }

    TIntHashSet lines = new TIntHashSet();
    List<XBreakpoint<?>> toRemove = new SmartList<XBreakpoint<?>>();
    for (XLineBreakpointImpl breakpoint : breakpoints) {
      breakpoint.updatePosition();
      if (!breakpoint.isValid() || !lines.add(breakpoint.getLine())) {
        toRemove.add(breakpoint);
      }
    }

    removeBreakpoints(toRemove);
  }
 public void unregisterBreakpoint(final XLineBreakpointImpl breakpoint) {
   RangeHighlighter highlighter = breakpoint.getHighlighter();
   if (highlighter != null) {
     myBreakpoints.remove(breakpoint);
   }
 }