PsiVariable (@NotNull PsiMethodCallExpression call) { PsiElement qualifier = call.getMethodExpression().getQualifier(); if (qualifier instanceof PsiParenthesizedExpression) { qualifier = PsiUtil.skipParenthesizedExprDown((PsiExpression)qualifier); } PsiReferenceExpression ref = ObjectUtils.tryCast(qualifier, PsiReferenceExpression.class); if (ref == null) return null; return ObjectUtils.tryCast(ref.resolve(), PsiVariable.class); }