diff options
author | Susan Franklin | 2010-04-21 23:28:25 +0000 |
---|---|---|
committer | Susan Franklin | 2010-04-21 23:28:25 +0000 |
commit | b195745e69fe4ef35dae5ebf08bdd74d7e382d2d (patch) | |
tree | 9d6e28e66a1f35876681bf545d8bfdce91d1c2f7 /bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine | |
parent | d9adc54a78d5c9530414397c6c6844fa735ac16b (diff) | |
download | rt.equinox.p2-b195745e69fe4ef35dae5ebf08bdd74d7e382d2d.tar.gz rt.equinox.p2-b195745e69fe4ef35dae5ebf08bdd74d7e382d2d.tar.xz rt.equinox.p2-b195745e69fe4ef35dae5ebf08bdd74d7e382d2d.zip |
Bug 278191 - [ui] Filtering of artifact repository does not work for non colocated repos
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java index 6d99aa28b..3dfe7df3e 100644 --- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java +++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java @@ -15,7 +15,6 @@ import java.net.URI; import java.net.URISyntaxException; import java.util.*; import org.eclipse.core.runtime.*; -import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils; import org.eclipse.equinox.internal.p2.core.helpers.LogHelper; import org.eclipse.equinox.internal.p2.metadata.repository.Activator; import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus; @@ -29,6 +28,7 @@ import org.eclipse.equinox.p2.query.IQueryResult; import org.eclipse.equinox.p2.repository.IRepository; import org.eclipse.equinox.p2.repository.IRepositoryReference; import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository; +import org.eclipse.equinox.p2.repository.spi.RepositoryReference; import org.eclipse.osgi.util.NLS; public class ProfileMetadataRepository extends AbstractMetadataRepository { @@ -40,6 +40,7 @@ public class ProfileMetadataRepository extends AbstractMetadataRepository { public static final String TYPE = "org.eclipse.equinox.p2.engine.repo.metadataRepository"; //$NON-NLS-1$ public static final Integer VERSION = new Integer(1); private IProfile profile; + private HashSet<IRepositoryReference> repositories = new HashSet<IRepositoryReference>(); public ProfileMetadataRepository(IProvisioningAgent agent, URI location, IProgressMonitor monitor) throws ProvisionException { super(agent, location.toString(), TYPE, VERSION.toString(), location, null, null, null); @@ -59,6 +60,7 @@ public class ProfileMetadataRepository extends AbstractMetadataRepository { if (bus == null) return; for (URI repo : artifactRepos) { + repositories.add(new RepositoryReference(repo, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED)); bus.publishEvent(new RepositoryEvent(repo, IRepository.TYPE_ARTIFACT, RepositoryEvent.DISCOVERED, true)); } } @@ -154,7 +156,7 @@ public class ProfileMetadataRepository extends AbstractMetadataRepository { } public Collection<IRepositoryReference> getReferences() { - return CollectionUtils.emptyList(); + return Collections.unmodifiableCollection(repositories); } public void initialize(RepositoryState state) { |