void (final Consumer<? super String> urlConsumer) { myDependenciesEnumerator.processDependencies(dependencyElement -> { if (dependencyElement instanceof JpsModuleSourceDependency) { processModuleRootUrls(dependencyElement.getContainingModule(), dependencyElement, urlConsumer); } else if (dependencyElement instanceof JpsModuleDependency) { JpsModule dep = ((JpsModuleDependency)dependencyElement).getModule(); if (dep != null) { processModuleRootUrls(dep, dependencyElement, urlConsumer); } } else if (dependencyElement instanceof JpsLibraryDependency) { JpsLibrary lib = ((JpsLibraryDependency)dependencyElement).getLibrary(); if (lib != null) { processLibraryRootUrls(lib, urlConsumer); } } else if (dependencyElement instanceof JpsSdkDependency) { JpsLibrary lib = ((JpsSdkDependency)dependencyElement).resolveSdk(); if (lib != null) { processLibraryRootUrls(lib, urlConsumer); } } return true; }); }