ElementPattern<PsiElement> () { return psiElement(XmlTokenType.XML_DATA_CHARACTERS) .withParent(StandardPatterns.or(psiElement(XmlText.class), psiElement(XmlDocument.class))) .inFile(PlatformPatterns.psiFile(HtmlFileImpl.class)); }