void (@NotNull VirtualFile file, @NotNull Map<? super Document, ? super List<HighlightInfo>> result, @NotNull DaemonProgressIndicator daemonIndicator, @Nullable HighlightSeverity minimumSeverity) { ApplicationManager.getApplication().assertIsNonDispatchThread(); daemonIndicator.checkCanceled(); PsiFile psiFile = ReadAction.compute(() -> PsiManager.getInstance(myProject).findFile(file)); Document document = ReadAction.compute(() -> FileDocumentManager.getInstance().getDocument(file)); if (psiFile == null || document == null || !ReadAction.compute(() -> ProblemHighlightFilter.shouldProcessFileInBatch(psiFile))) { return; } ProperTextRange range = ProperTextRange.create(0, document.getTextLength()); HighlightingSessionImpl session = HighlightingSessionImpl.createHighlightingSession(psiFile, daemonIndicator, null, range, CanISilentlyChange.Result.UH_UH, 0); session.setMinimumSeverity(minimumSeverity); ProgressManager.getInstance().runProcess(() -> runMainPasses(daemonIndicator, result, psiFile, document), daemonIndicator); }