Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2010-06-23 14:29:16 -0400
committerAndrew Niefer2010-06-23 14:29:16 -0400
commitfcaec223d277c2a66e22e1422f0246db0b825546 (patch)
treef965277e91a95ab49db8c77f5f52c987c3f453a9 /bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse
parent5d889bc176aadf2651ae204708332b23bcc3434c (diff)
downloadrt.equinox.p2-fcaec223d277c2a66e22e1422f0246db0b825546.tar.gz
rt.equinox.p2-fcaec223d277c2a66e22e1422f0246db0b825546.tar.xz
rt.equinox.p2-fcaec223d277c2a66e22e1422f0246db0b825546.zip
bug 317711 - Use add elements directly
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
index 023ce05ca..14659399d 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
@@ -45,6 +45,21 @@ public class CompositeRepositoryTask extends AbstractRepositoryTask {
* Add the listed repositories to the composite repository
*/
public void addConfiguredAdd(RepositoryList list) {
+ if (list.getRepoLocation() != null) {
+ RepositoryDescriptor descriptor = new RepositoryDescriptor();
+ //don't use RepositoryList#getRepoLocationURI() because we want relative URIs if they were specified
+ try {
+ descriptor.setLocation(URIUtil.fromString(list.getRepoLocation()));
+ descriptor.setOptional(list.isOptional());
+ if (!list.isBoth()) {
+ descriptor.setKind(list.isArtifact() ? RepositoryDescriptor.KIND_ARTIFACT : RepositoryDescriptor.KIND_METADATA);
+ }
+ ((CompositeRepositoryApplication) application).addChild(descriptor);
+ } catch (URISyntaxException e) {
+ //no good
+ }
+ }
+
for (DestinationRepository repo : list.getRepositoryList()) {
((CompositeRepositoryApplication) application).addChild(repo.getDescriptor());
}
@@ -54,6 +69,15 @@ public class CompositeRepositoryTask extends AbstractRepositoryTask {
* Remove the listed repositories from the composite repository
*/
public void addConfiguredRemove(RepositoryList list) {
+ if (list.getRepoLocation() != null) {
+ RepositoryDescriptor descriptor = new RepositoryDescriptor();
+ descriptor.setLocation(list.getRepoLocationURI());
+ descriptor.setOptional(list.isOptional());
+ if (!list.isBoth()) {
+ descriptor.setKind(list.isArtifact() ? RepositoryDescriptor.KIND_ARTIFACT : RepositoryDescriptor.KIND_METADATA);
+ }
+ ((CompositeRepositoryApplication) application).addChild(descriptor);
+ }
for (DestinationRepository repo : list.getRepositoryList()) {
((CompositeRepositoryApplication) application).removeChild(repo.getDescriptor());
}

Back to the top