boolean (MavenDomConfiguration pluginNode) { XmlElement xmlElement = pluginNode.getXmlElement(); if (xmlElement == null) return false; PsiElement pluginTag = xmlElement.getParent(); if (pluginTag == null) return false; PsiElement pluginsTag = pluginTag.getParent(); if (pluginsTag == null) return false; PsiElement pluginManagementTag = pluginsTag.getParent(); return pluginManagementTag instanceof XmlTag && "pluginManagement".equals(((XmlTag)pluginManagementTag).getName()); }