void (@NotNull PsiFile file, @NotNull Editor editor, @NotNull ProperTextRange visibleRange) { ApplicationManager.getApplication().assertIsNonDispatchThread(); ApplicationManager.getApplication().assertReadAccessAllowed(); int offset = editor.getCaretModel().getOffset(); Project project = file.getProject(); Document document = editor.getDocument(); AtomicInteger unresolvedInfosProcessed = new AtomicInteger(); // first, compute quick fixes close to the caret DaemonCodeAnalyzerEx.processHighlights(document, project, HighlightSeverity.ERROR, offset, document.getTextLength(), info -> { if (!info.isUnresolvedReference()) { return true; } startUnresolvedRefsJob(info, editor, file, visibleRange); // start no more than two jobs return unresolvedInfosProcessed.incrementAndGet() <= 2; }); // then, compute quickfixes inside the entire visible area, to show import hints for all unresolved references in vicinity if enabled if (DaemonCodeAnalyzerSettings.getInstance().isImportHintEnabled() && DaemonCodeAnalyzer.getInstance(myProject).isImportHintsEnabled(file)) { DaemonCodeAnalyzerEx.processHighlights(document, project, HighlightSeverity.ERROR, visibleRange.getStartOffset(), visibleRange.getEndOffset(), info -> { if (info.isUnresolvedReference()) { startUnresolvedRefsJob(info, editor, file, visibleRange); } return true; }); } }