void (@NotNull MavenDomProjectModel model) { if (model.isValid()) { final XmlElement root = model.getXmlElement(); if (root != null) { root.acceptChildren(new XmlElementVisitor() { @Override public void visitXmlText(@NotNull XmlText text) { XmlTag xmlTag = PsiTreeUtil.getParentOfType(text, XmlTag.class); if (xmlTag != null && !xmlTag.getName().equals(myPropertyName)) { usages.addAll(getUsages(text)); } } @Override public void visitXmlAttributeValue(@NotNull XmlAttributeValue value) { XmlTag xmlTag = PsiTreeUtil.getParentOfType(value, XmlTag.class); if (xmlTag != null && !xmlTag.equals(root)) { usages.addAll(getUsages(value)); } } @Override public void visitXmlElement(@NotNull XmlElement element) { element.acceptChildren(this); } }); } } }