boolean (Collection<PsiReference> refs) { for (PsiReference ref : refs) { final PsiElement element = ref.getElement(); final PsiElement parent = element.getParent(); if (parent instanceof GrAssignmentExpression && ((GrAssignmentExpression)parent).getLValue() == element) return true; if (parent instanceof GrUnaryExpression) return true; } return false; }