PsiElement (IElementType type, ASTNode node) { final PsiElement element = super.createElement(type, node); if (element != null) { return element; } if (type == XPath2ElementTypes.VARIABLE_DECL) { return new XPath2VariableImpl(node); } else if (type == XPath2ElementTypes.CONTEXT_ITEM) { return new XPathStepImpl(node); } else if (type == XPath2ElementTypes.IF) { return new XPath2IfImpl(node); } else if (type == XPath2ElementTypes.QUANTIFIED) { return new XPath2QuantifiedExprImpl(node); } else if (type == XPath2ElementTypes.FOR) { return new XPath2ForImpl(node); } else if (type == XPath2ElementTypes.BINDING_SEQ) { return new XPath2VariableDeclarationImpl(node); } else if (type == XPath2ElementTypes.SEQUENCE) { return new XPath2SequenceImpl(node); } else if (type == XPath2ElementTypes.RANGE_EXPRESSION) { return new XPath2RangeExpressionImpl(node); } else if (type == XPath2ElementTypes.CASTABLE_AS) { return new XPath2CastableImpl(node); } else if (type == XPath2ElementTypes.CAST_AS) { return new XPath2CastImpl(node); } else if (type == XPath2ElementTypes.INSTANCE_OF) { return new XPath2InstanceOfImpl(node); } else if (type == XPath2ElementTypes.TREAT_AS) { return new XPath2TreatAsImpl(node); } else if (XPath2ElementTypes.TYPE_ELEMENTS.contains(type)) { return new XPath2TypeElementImpl(node); } return null; }