void (@NotNull PsiFile file, @NotNull Editor editor) { ApplicationManager.getApplication().assertIsNonDispatchThread(); ApplicationManager.getApplication().assertReadAccessNotAllowed(); List<HighlightInfo> relevantInfos = new ArrayList<>(); Project project = file.getProject(); ReadAction.run(() -> { PsiUtilBase.assertEditorAndProjectConsistent(project, editor); CaretModel caretModel = editor.getCaretModel(); int offset = caretModel.getOffset(); Document document = editor.getDocument(); int logicalLine = caretModel.getLogicalPosition().line; processHighlights(document, project, null, 0, document.getTextLength(), info -> { if (info.containsOffset(offset, true) && info.isUnresolvedReference()) { relevantInfos.add(info); return true; } // since we don't know fix ranges of potentially not-yet-added quick fixes, consider all HighlightInfos at the same line boolean atTheSameLine = editor.offsetToLogicalPosition(info.getActualStartOffset()).line <= logicalLine && logicalLine <= editor.offsetToLogicalPosition(info.getActualEndOffset()).line; if (atTheSameLine && info.isUnresolvedReference()) { relevantInfos.add(info); } return true; }); }); UnresolvedReferenceQuickFixUpdater.getInstance(project).waitQuickFixesSynchronously(file, editor, relevantInfos); }