List<String> (PsiElement psiElement) { LinkedList<String> methodCallInfo = new LinkedList<>(); for (GrMethodCall current = PsiTreeUtil.getParentOfType(psiElement, GrMethodCall.class); current != null; current = PsiTreeUtil.getParentOfType(current, GrMethodCall.class)) { GrExpression expression = current.getInvokedExpression(); String text = expression.getText(); if (text != null) { methodCallInfo.addFirst(text); } } return methodCallInfo; }