boolean (PsiElement position) { if (PsiTreeUtil.getParentOfType(position, HtmlTag.class, false) != null) { return true; } XmlTag xmlTag = PsiTreeUtil.getParentOfType(position, XmlTag.class, false); return xmlTag != null && xmlTag.getLanguage() == XHTMLLanguage.INSTANCE; }