FileElement (CharSequence docText) { FileElement treeElement; TreeElement contentLeaf = createContentLeafElement(docText); if (contentLeaf instanceof FileElement) { treeElement = (FileElement)contentLeaf; } else { CompositeElement xxx = ASTFactory.composite(myElementType); assert xxx instanceof FileElement : "BUMM"; treeElement = (FileElement)xxx; treeElement.rawAddChildrenWithoutNotifications(contentLeaf); } return treeElement; }