PsiLocalVariable (@NotNull PsiElement anchor) { if (anchor.getParent() instanceof PsiReferenceExpression && anchor.getParent().getParent() instanceof PsiCallExpression) { anchor = ((PsiReferenceExpression)anchor.getParent()).getQualifierExpression(); } if (!(anchor instanceof PsiExpression)) return null; return ExpressionUtils.resolveLocalVariable((PsiExpression)anchor); }