void (PsiMember classMember, PsiJavaCodeReferenceElement classMemberReference) { if (classMember instanceof PsiField && !classMember.hasModifierProperty(PsiModifier.STATIC)) { final PsiExpression expression = PsiTreeUtil.getParentOfType(classMemberReference, PsiExpression.class, false); if (expression == null || !PsiUtil.isAccessedForWriting(expression)) { usedFields.add((PsiField)classMember); return; } } super.visitClassMemberReferenceElement(classMember, classMemberReference); }