boolean (@NotNull PsiFile file) { JavaPsiFacade javaPsi = JavaPsiFacade.getInstance(file.getProject()); GlobalSearchScope fileResolveScope = file.getResolveScope(); for (String annotation : myBlockingAnnotations) { if (javaPsi.findClass(annotation, fileResolveScope) != null) return true; } for (String annotation : myNonBlockingAnnotations) { if (javaPsi.findClass(annotation, fileResolveScope) != null) return true; } return false; }