eclipse/eclipse-junit-dropins.patch

25 lines
1.3 KiB
Diff
Raw Normal View History

2009-12-16 14:35:34 +00:00
--- plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/P2Utils.java
+++ plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/P2Utils.java
@@ -90,6 +90,21 @@ class P2Utils {
try {
URL bundlesTxt= new URL(bundlesLocationURL.getProtocol(), bundlesLocationURL.getHost(), new File(bundlesLocationURL.getFile(), bundleInfoPath).getAbsolutePath());
BundleInfo bundles[]= getBundlesFromFile(bundlesLocationURL, bundlesTxt);
+ if (useConfigArea) {
+ // the config area may have relative URLs that should be
+ // resolved to the install location.
+ URL installLocationURL = Platform.getInstallLocation().getURL();
+ BundleInfo installBundles[]= getBundlesFromFile(installLocationURL, bundlesTxt);
+ if (bundles == null || bundles.length == 0) {
+ bundles = installBundles;
+ }
+ else if (installBundles != null && installBundles.length > 0) {
+ BundleInfo mergedBundles[] = new BundleInfo[bundles.length + installBundles.length];
+ System.arraycopy(bundles, 0, mergedBundles, 0, bundles.length);
+ System.arraycopy(installBundles, 0, mergedBundles, bundles.length, installBundles.length);
+ bundles = mergedBundles;
+ }
+ }
if (bundles == null || bundles.length == 0) {
return null;
}