boolean (@NotNull MavenDomShortArtifactCoordinates dependency) { DomElement parent = dependency.getParent(); if (!(parent instanceof MavenDomDependencies)) return false; return parent.getParent() instanceof MavenDomDependencyManagement; }