int (XLineBreakpoint<P> breakpoint) { if (!XDebuggerUtil.areInlineBreakpointsEnabled()) return -1; return ReadAction.compute(() -> { var range = breakpoint.getType().getHighlightRange(breakpoint); if (range == null) return 0; // full line breakpoint var offset = range.getStartOffset(); var file = VirtualFileManager.getInstance().findFileByUrl(breakpoint.getFileUrl()); if (file == null) return -1; var document = FileDocumentManager.getInstance().getDocument(file); if (document == null) return -1; if (0 > offset || offset > document.getTextLength()) return -1; return offset - document.getLineStartOffset(document.getLineNumber(offset)); }); }