ProperTextRange (@NotNull Point viewPosition, @NotNull Editor editor) { DaemonCodeAnalyzerSettings.getInstance().setImportHintEnabled(true); int offset = editor.logicalPositionToOffset(editor.xyToLogicalPosition(viewPosition)); VisibleHighlightingPassFactory.setVisibleRangeForHeadlessMode(editor, new ProperTextRange(offset, offset)); return editor.calculateVisibleRange(); }