PsiElement (@NotNull PsiElement expr, @NotNull PsiAssignmentExpression parentExpr) { PsiElement result = null; if (expr instanceof PsiReferenceExpression) { result = ((PsiReferenceExpression)expr).resolve(); } else { final PsiExpression lExpr = PsiUtil.deparenthesizeExpression(parentExpr.getLExpression()); if (lExpr instanceof PsiReferenceExpression) { result = ((PsiReferenceExpression)lExpr).resolve(); } } return result; }