CompositeElement (final @NotNull IElementType type) { if (type == XML_TAG) { return new XmlTagImpl(); } if (type == XML_CONDITIONAL_SECTION) { return new XmlConditionalSectionImpl(); } if (type == HTML_TAG) { return new HtmlTagImpl(); } if (type == XML_TEXT) { return new XmlTextImpl(); } if (type == XML_PROCESSING_INSTRUCTION) { return new XmlProcessingInstructionImpl(); } if (type == XML_DOCUMENT) { return new XmlDocumentImpl(); } if (type == HTML_DOCUMENT) { return new HtmlDocumentImpl(); } if (type == XML_PROLOG) { return new XmlPrologImpl(); } if (type == XML_DECL) { return new XmlDeclImpl(); } if (type == XML_ATTRIBUTE) { return new XmlAttributeImpl(); } if (type == XML_ATTRIBUTE_VALUE) { return new XmlAttributeValueImpl(); } if (type == XML_COMMENT) { return new XmlCommentImpl(); } if (type == XML_DOCTYPE) { return new XmlDoctypeImpl(); } if (type == XML_MARKUP_DECL) { return new XmlMarkupDeclImpl(); } if (type == XML_ELEMENT_DECL) { return new XmlElementDeclImpl(); } if (type == XML_ENTITY_DECL) { return new XmlEntityDeclImpl(); } if (type == XML_ATTLIST_DECL) { return new XmlAttlistDeclImpl(); } if (type == XML_ATTRIBUTE_DECL) { return new XmlAttributeDeclImpl(); } if (type == XML_NOTATION_DECL) { return new XmlNotationDeclImpl(); } if (type == XML_ELEMENT_CONTENT_SPEC) { return new XmlElementContentSpecImpl(); } if (type == XML_ELEMENT_CONTENT_GROUP) { return new XmlElementContentGroupImpl(); } if (type == XML_ENTITY_REF) { return new XmlEntityRefImpl(); } if (type == XML_ENUMERATED_TYPE) { return new XmlEnumeratedTypeImpl(); } if (type == XML_CDATA) { return new CompositePsiElement(XML_CDATA) {}; } if (type instanceof ITemplateDataElementType) { return new XmlFileElement(type, null); } return null; }