summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2013-04-09 17:06:41 (EDT)
committer Curtis Windatt2013-04-10 15:24:25 (EDT)
commite29300c629991523d3544f9c2d757dd56306bcd7 (patch)
treea78a5060e3e5590a4bd90499960a5f504349b209
parent7541085b19966da1a45f372318aaad2b0f5030c7 (diff)
downloadeclipse.pde.ui-e29300c629991523d3544f9c2d757dd56306bcd7.zip
eclipse.pde.ui-e29300c629991523d3544f9c2d757dd56306bcd7.tar.gz
eclipse.pde.ui-e29300c629991523d3544f9c2d757dd56306bcd7.tar.bz2
Bug 404512 - [target] Target definition fails to load bundles when
available from multiple directory bundle locations Change-Id: Ic514dde9fe4980a4462dfe75bb656f2992e46039
-rw-r--r--ui/org.eclipse.pde.core/src/org/eclipse/pde/core/target/LoadTargetDefinitionJob.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/target/LoadTargetDefinitionJob.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/target/LoadTargetDefinitionJob.java
index 30fca72..1f844f6 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/target/LoadTargetDefinitionJob.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/target/LoadTargetDefinitionJob.java
@@ -408,15 +408,19 @@ public class LoadTargetDefinitionJob extends WorkspaceJob {
}
}
- // Compute missing (not included) bundles (preference need to know disabled/missing bundles)
+ // Compute missing (not included) bundles (preference stores the disabled/missing bundles, instead of the included bundles)
List<BundleInfo> missing = new ArrayList<BundleInfo>();
NameVersionDescriptor[] restrictions = fTarget.getIncluded();
if (restrictions != null) {
for (int j = 0; j < allBundles.length; j++) {
TargetBundle bi = allBundles[j];
if (bi.getStatus().isOK()) {
- if (!included.contains(bi.getBundleInfo())) {
- missing.add(bi.getBundleInfo());
+ BundleInfo bundleInfo = bi.getBundleInfo();
+ NameVersionDescriptor desc = new NameVersionDescriptor(bundleInfo.getSymbolicName(), bundleInfo.getVersion());
+ // Check if the bundle is part of the included bundles or is an exact duplicate
+ if (!duplicates.contains(desc) && !included.contains(bundleInfo)) {
+ missing.add(bundleInfo);
+ duplicates.add(desc);
}
}
}