boolean (@NotNull PsiElement element) { if (element instanceof GrCodeReferenceElement && element.getParent() instanceof GrAnonymousClassDefinition anonymous) { if (anonymous.getFields().length == 0) { return true; } } return false; }