Tokenizer (PsiElement element) { if (element instanceof XmlText) { return myXmlTextTokenizer; } if (element instanceof XmlToken && ((XmlToken)element).getTokenType() == XmlTokenType.XML_DATA_CHARACTERS && !isXmlDataCharactersParentHandledByItsStrategy(element.getParent())) { // Special case for all other XML_DATA_CHARACTERS, which are not handled through parent PSI if (isInTemplateLanguageFile(element)) return EMPTY_TOKENIZER; return TEXT_TOKENIZER; } if (element instanceof XmlAttributeValue) { return myXmlAttributeTokenizer; } return super.getTokenizer(element); }