private Set<IMetadataRepository> getLoadedMetadataRepositories(IProgressMonitor monitor) { IMetadataRepositoryManager repoManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME); URI[] repositories = metadataRepositories == null ? repoManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL) : metadataRepositories; HashMap<String, IMetadataRepository> repos = new HashMap<String, IMetadataRepository>(); SubMonitor sub = SubMonitor.convert(monitor, repositories.length * 100); // Clear out the list of remembered artifact repositories referencedArtifactRepositories = new HashMap<String, URI>(); for (int i = 0; i < repositories.length; i++) { if (sub.isCanceled()) throw new OperationCanceledException(); loadMetadataRepository(repoManager, repositories[i], repos, shouldFollowReferences(), sub.newChild(100)); } Set<IMetadataRepository> set = new HashSet<IMetadataRepository>(); set.addAll(repos.values()); return set; }
private Set<IMetadataRepository> getLoadedMetadataRepositories(IProgressMonitor monitor) { IMetadataRepositoryManager repoManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME); URI[] repositories = metadataRepositories == null ? repoManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL) : metadataRepositories; HashMap<String, IMetadataRepository> repos = new HashMap<>(); SubMonitor sub = SubMonitor.convert(monitor, repositories.length * 100); // Clear out the list of remembered artifact repositories referencedArtifactRepositories = new HashMap<>(); for (int i = 0; i < repositories.length; i++) { if (sub.isCanceled()) throw new OperationCanceledException(); loadMetadataRepository(repoManager, repositories[i], repos, shouldFollowReferences(), sub.newChild(100)); } Set<IMetadataRepository> set = new HashSet<>(); set.addAll(repos.values()); return set; }
try { if (ref.getType() == IRepository.TYPE_METADATA && followMetadataRepoReferences && isEnabled(manager, ref)) { loadMetadataRepository(manager, ref.getLocation(), repos, followMetadataRepoReferences, repoSubMon.newChild(100)); } else if (ref.getType() == IRepository.TYPE_ARTIFACT) {
try { if (ref.getType() == IRepository.TYPE_METADATA && followMetadataRepoReferences && isEnabled(manager, ref)) { loadMetadataRepository(manager, ref.getLocation(), repos, followMetadataRepoReferences, repoSubMon.newChild(100)); } else if (ref.getType() == IRepository.TYPE_ARTIFACT) {