diff options
author | Curtis Windatt | 2013-04-09 21:06:41 +0000 |
---|---|---|
committer | Curtis Windatt | 2013-04-10 19:24:25 +0000 |
commit | e29300c629991523d3544f9c2d757dd56306bcd7 (patch) | |
tree | a78a5060e3e5590a4bd90499960a5f504349b209 | |
parent | 7541085b19966da1a45f372318aaad2b0f5030c7 (diff) | |
download | eclipse.pde.ui-e29300c629991523d3544f9c2d757dd56306bcd7.tar.gz eclipse.pde.ui-e29300c629991523d3544f9c2d757dd56306bcd7.tar.xz eclipse.pde.ui-e29300c629991523d3544f9c2d757dd56306bcd7.zip |
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.java | 10 |
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 30fca7261b..1f844f6168 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);
}
}
}
|