RelativePoint (@NotNull Editor editor, int line) { if (line > -1) { Point p = editor.logicalPositionToXY(new LogicalPosition(line + 1, 0)); boolean isRemoteEditor = !ClientId.isLocal(ClientEditorManager.getClientId(editor)); if (isRemoteEditor || editor.getScrollingModel().getVisibleArea().contains(p)) { return new RelativePoint(editor.getContentComponent(), p); } } return null; }