TreeElement (final TreeElement first, final ASTNode last, ASTNode anchor, Boolean before) { TreeElement lt = (TreeElement)findChildByRole(ChildRole.LT_IN_TYPE_LIST); final CharTable treeCharTab = SharedImplUtil.findCharTableByTree(this); if (lt == null) { lt = Factory.createSingleLeafElement(JavaTokenType.LT, "<", 0, 1, treeCharTab, getManager()); super.addInternal(lt, lt, getFirstChildNode(), Boolean.TRUE); } TreeElement gt = (TreeElement)findChildByRole(ChildRole.GT_IN_TYPE_LIST); if (gt == null) { gt = Factory.createSingleLeafElement(JavaTokenType.GT, ">", 0, 1, treeCharTab, getManager()); super.addInternal(gt, gt, getLastChildNode(), Boolean.FALSE); } if (anchor == null) { if (before == null || before.booleanValue()){ anchor = gt; before = Boolean.TRUE; } else{ anchor = lt; before = Boolean.FALSE; } } TreeElement firstAdded = super.addInternal(first, last, anchor, before); if (first == last && first.getElementType() == JavaElementType.TYPE_PARAMETER) { JavaSourceUtil.addSeparatingComma(this, first, TYPE_PARAMETER_SET); } return firstAdded; }