boolean (@NotNull PsiElement element) { final PsiElement parent = element.getParent(); if (!(parent instanceof PsiField field)) { return false; } if (element instanceof PsiComment && element == parent.getFirstChild()) { return false; } final PsiExpression initializer = field.getInitializer(); if (initializer == null) { return false; } final PsiClass containingClass = field.getContainingClass(); if (containingClass == null || containingClass.isInterface()) { return false; } if (containingClass.isRecord() && !field.hasModifierProperty(PsiModifier.STATIC)) { return false; } return !ErrorUtil.containsError(field); }