String () { PsiElement[] children = myBody.getChildren(); // Keep everything except braces return StreamEx.of(children, 1, children.length - 1) .dropWhile(e -> e instanceof PsiWhiteSpace) .map(PsiElement::getText).joining(); }