boolean (PsiElement parent) { if (parent instanceof PsiMethodReferenceExpression) return false; PsiElement resolve = ((PsiReferenceExpression)parent).resolve(); if (resolve instanceof PsiField) { final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(resolve.getProject()); final PsiExpression unqualifiedFieldReference = elementFactory.createExpressionFromText(((PsiField)resolve).getName(), parent); return resolve == ((PsiReferenceExpression)unqualifiedFieldReference).resolve(); } return true; }