boolean (@NotNull Project project, Editor editor, PsiFile file) { if (!(file instanceof XmlFile)) return false; PsiElement element = myElement.retrieve(); XmlTag rootTag = ((XmlFile)file).getRootTag(); return element != null && rootTag != null && !PsiUtilCore.hasErrorElementChild(rootTag); }