PsiExpression () { final PsiExpression expression = PsiTreeUtil.getParentOfType(getFile().findElementAt(getEditor().getCaretModel().getOffset()), PsiExpression.class); if (expression instanceof PsiReferenceExpression && expression.getParent() instanceof PsiMethodCallExpression) { return (PsiExpression)expression.getParent(); } return expression; }