ASTNode (ASTNode first, ASTNode last, ASTNode anchor, Boolean before) { appendParenthesesIfNeeded(); if (first == last && first.getPsi() instanceof PsiTypeParameter) { boolean hasParams = getTypeParameters().length > 0; final ASTNode _anchor; if (anchor == null) { if (before.booleanValue()) { _anchor = getLastChild().getNode(); } else { _anchor = getFirstChild().getNode(); } } else { _anchor = anchor; } final ASTNode node = super.addInternal(first, last, _anchor, before); if (hasParams) { getNode().addLeaf(GroovyTokenTypes.mCOMMA, ",", anchor != null ? anchor : node); } return node; } else { return super.addInternal(first, last, anchor, before); } }