boolean (@NotNull PsiModifierList modifierList) { // FieldDefaults only change modifiers of class fields // but not for enum constants or lombok generated fields final PsiElement psiElement = modifierList.getParent(); if (!(psiElement instanceof PsiField) || psiElement instanceof PsiEnumConstant || psiElement instanceof LombokLightFieldBuilder) { return false; } final PsiClass searchableClass = PsiTreeUtil.getParentOfType(modifierList, PsiClass.class, true); return null != searchableClass && canBeAffected(searchableClass); }