boolean (PsiAssignmentExpression expression) { final PsiExpression lExpression = expression.getLExpression(); if (lExpression instanceof PsiReferenceExpression) { final PsiElement resolved = ((PsiReferenceExpression)lExpression).resolve(); if (resolved instanceof PsiField field) { final NavigatablePsiElement containingMethod = PsiTreeUtil.getParentOfType(expression, PsiMethod.class, PsiLambdaExpression.class); if (containingMethod instanceof PsiMethod) { final PsiMethod setter = PropertyUtilBase .findPropertySetter(field.getContainingClass(), field.getName(), field.hasModifierProperty(PsiModifier.STATIC), false); if (containingMethod.isEquivalentTo(setter)) { return true; } } } } return false; }