boolean (@NotNull final PsiFile file, final int offset) { if (!MavenDomUtil.isMavenFile(file)) return false; PsiElement element = file.findElementAt(offset); if (element == null) return false; if (PsiTreeUtil.getParentOfType(element, XmlText.class) == null) return false; return true; }