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