boolean (@NotNull final Processor<? super MavenDomDependency> processor, @NotNull MavenDomDependency domDependency, @NotNull Set<String> recursionProtector) { if ("import".equals(domDependency.getScope().getRawText())) { GenericDomValue<String> version = domDependency.getVersion(); if (version.getXmlElement() != null) { GenericDomValueReference<String> reference = new GenericDomValueReference<>(version); PsiElement resolve = reference.resolve(); if (resolve instanceof XmlFile) { if (!recursionProtector.add(((XmlFile)resolve).getVirtualFile().getPath())) { return false; } MavenDomProjectModel dependModel = MavenDomUtil.getMavenDomModel((PsiFile)resolve, MavenDomProjectModel.class); if (dependModel == null) { return false; } for (MavenDomDependency dependency : dependModel.getDependencyManagement().getDependencies().getDependencies()) { if (processDependencyRecurrently(processor, dependency, recursionProtector)) { return true; } } } } } else { if (processor.process(domDependency)) return true; } return false; }