void (@NotNull List<? extends HighlightInfo> fileLevelHighlights, int group, boolean cleanOldHighlights) { Project project = getProject(); DaemonCodeAnalyzerEx codeAnalyzer = DaemonCodeAnalyzerEx.getInstanceEx(project); PsiFile psiFile = getPsiFile(); boolean shouldUpdate = !fileLevelHighlights.isEmpty() || codeAnalyzer.hasFileLevelHighlights(group, psiFile); if (shouldUpdate) { Future<?> future = EdtExecutorService.getInstance().submit(() -> { if (project.isDisposed() || isCanceled()) return; if (cleanOldHighlights) { codeAnalyzer.cleanFileLevelHighlights(group, psiFile); } for (HighlightInfo fileLevelInfo : fileLevelHighlights) { codeAnalyzer.addFileLevelHighlight(group, fileLevelInfo, psiFile, null); } }); pendingFileLevelHighlightRequests.add((RunnableFuture<?>)future); } }