boolean (@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { if (file instanceof PsiCompiledElement) return false; PsiClass targetClass = getTargetClass(editor, file); return targetClass != null && isValidForClass(targetClass); }