diff options
author | DJ Houghton | 2011-06-07 20:30:01 +0000 |
---|---|---|
committer | DJ Houghton | 2011-06-07 20:30:01 +0000 |
commit | d24435474b7aa9d3ea9873c86b75bf91d1b7d884 (patch) | |
tree | fe27ee0a93ae3eaa7f9e8774760fde62ea3f36f4 | |
parent | f876e87cf566e6b245f72c0d9e3c25ec184c9795 (diff) | |
download | rt.equinox.p2-d24435474b7aa9d3ea9873c86b75bf91d1b7d884.tar.gz rt.equinox.p2-d24435474b7aa9d3ea9873c86b75bf91d1b7d884.tar.xz rt.equinox.p2-d24435474b7aa9d3ea9873c86b75bf91d1b7d884.zip |
Bug 346565 - [shared] 64Bit: Eclipse plugins not loading in on x64 with mixed user roles (launching as non-admin)
2 files changed, 25 insertions, 13 deletions
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF index 7140a1f1c..067f8879c 100644 --- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.equinox.p2.reconciler.dropins;singleton:=true -Bundle-Version: 1.1.100.qualifier +Bundle-Version: 1.1.200.qualifier Bundle-Activator: org.eclipse.equinox.internal.p2.reconciler.dropins.Activator Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java index e09138b1c..e09c2597a 100644 --- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java +++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java @@ -11,8 +11,7 @@ package org.eclipse.equinox.internal.p2.reconciler.dropins; import java.io.*; -import java.net.URI; -import java.net.URISyntaxException; +import java.net.*; import java.util.*; import java.util.Map.Entry; import org.eclipse.core.runtime.*; @@ -428,16 +427,29 @@ public class ProfileSynchronizer { StringBuffer buffer = new StringBuffer(); List<String> repositories = new ArrayList<String>(repositoryMap.keySet()); - final String OSGiInstallArea = Activator.getOSGiInstallArea().toExternalForm() + Constants.EXTENSION_LOCATION; - Collections.sort(repositories, new Comparator<String>() { - public int compare(String left, String right) { - if (OSGiInstallArea.equals(left)) - return -1; - if (OSGiInstallArea.equals(right)) - return 1; - return left.compareTo(right); - } - }); + URL installArea = Activator.getOSGiInstallArea(); + final String OSGiInstallArea; + try { + // The OSGi install area is an unencoded URL and repository locations are encoded URIs + // so make them the same so we can compare them. + // See https://bugs.eclipse.org/346565. + OSGiInstallArea = URIUtil.toURI(installArea).toString() + Constants.EXTENSION_LOCATION; + // Sort the repositories so the extension location at the OSGi install folder is first. + // See https://bugs.eclipse.org/246310. + Collections.sort(repositories, new Comparator<String>() { + public int compare(String left, String right) { + if (OSGiInstallArea.equals(left)) + return -1; + if (OSGiInstallArea.equals(right)) + return 1; + return left.compareTo(right); + } + }); + } catch (URISyntaxException e) { + // This shouldn't happen but if it does we will log the error and continue + // with the repositories in the default order. + LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Unable to convert OSGi install area: " + installArea + " into URI.", e)); //$NON-NLS-1$ //$NON-NLS-2$ + } for (Iterator<String> it = repositories.iterator(); it.hasNext();) { String repositoryId = it.next(); try { |