boolean (@NotNull PsiFile file) { HighlightingLevelManager highlightingLevelManager = HighlightingLevelManager.getInstance(file.getProject()); if (highlightingLevelManager.runEssentialHighlightingOnly(file)) { return false; } // both PsiJavaFile and PsiCodeFragment must match return file instanceof PsiImportHolder && !InjectedLanguageManager.getInstance(file.getProject()).isInjectedFragment(file); }