PsiMethodCallExpression (PsiElement element) { if (element instanceof PsiMethodCallExpression) { return (PsiMethodCallExpression)element; } for (PsiElement child = element.getFirstChild(); child != null; child = child.getNextSibling()) { final PsiMethodCallExpression call = findMethodCall(child); if (call != null) return call; } return null; }