PsiElement (@NotNull Project project, @NotNull String functionName) { PsiFile file = createTempFile(project, functionName + "() { }"); ShFunctionDefinition functionDefinition = PsiTreeUtil.findChildOfType(file, ShFunctionDefinition.class); assert functionDefinition != null; PsiElement word = functionDefinition.getWord(); assert word != null; return word; }