void (CompositeElement element, ASTNode node, TokenSet listTypes, boolean forward) { ASTNode child = node; while (true) { child = (forward ? child.getTreeNext() : child.getTreePrev()); if (child == null || child.getElementType() == JavaTokenType.COMMA) break; if (listTypes.contains(child.getElementType())) { CharTable charTable = SharedImplUtil.findCharTableByTree(element); PsiManager manager = element.getPsi().getManager(); TreeElement comma = Factory.createSingleLeafElement(JavaTokenType.COMMA, ",", 0, 1, charTable, manager); element.addInternal(comma, comma, (forward ? node : child), Boolean.FALSE); break; } } }