void (@NotNull Project project, @NotNull Document document, int startOffset, int endOffset, @NotNull Collection<? extends HighlightInfo> infos, @Nullable EditorColorsScheme colorsScheme, // if null, the global scheme will be used int group, @NotNull MarkupModelEx markup) { TextRange range = new TextRange(startOffset, endOffset); PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(document); if (psiFile instanceof PsiCompiledFile) { psiFile = ((PsiCompiledFile)psiFile).getDecompiledPsiFile(); } DaemonCodeAnalyzerEx codeAnalyzer = DaemonCodeAnalyzerEx.getInstanceEx(project); if (psiFile != null) { codeAnalyzer.cleanFileLevelHighlights(group, psiFile); } if (psiFile != null) { HighlightingSession session = HighlightingSessionImpl.createHighlightingSession(psiFile, new DaemonProgressIndicator(), colorsScheme, ProperTextRange.create(startOffset, endOffset), CanISilentlyChange.Result.UH_UH, 0); setHighlightersInRange(document, range, new ArrayList<>(infos), markup, group, session); } }