void (XBreakpoint<?> breakpoint, boolean isDefaultBreakpoint) { XBreakpointType type = breakpoint.getType(); XBreakpointBase<?, ?, ?> breakpointBase = (XBreakpointBase<?, ?, ?>)breakpoint; withLockMaybeCancellable(myLock, () -> { if (isDefaultBreakpoint) { Set<XBreakpointBase<?, ?, ?>> typeDefaultBreakpoints = myDefaultBreakpoints.get(breakpoint.getType()); if (typeDefaultBreakpoints != null) { typeDefaultBreakpoints.remove(breakpoint); } } else { myBreakpoints.remove(type, breakpointBase); } myAllBreakpoints.remove(breakpointBase); if (breakpointBase instanceof XLineBreakpointImpl) { myLineBreakpointManager.unregisterBreakpoint((XLineBreakpointImpl)breakpointBase); } }); UIUtil.invokeLaterIfNeeded(() -> breakpointBase.dispose()); sendBreakpointEvent(type, listener -> listener.breakpointRemoved(breakpoint)); }