Blame eclipse-drop-user-profile-on-platform-change.patch
|
Krzysztof Daniel |
65326ea |
--- rt.equinox.p2/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java
|
|
Krzysztof Daniel |
65326ea |
+++ rt.equinox.p2/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java
|
|
Krzysztof Daniel |
65326ea |
@@ -100,7 +100,10 @@
|
|
Krzysztof Daniel |
65326ea |
URL userConfigURL = userConfig.toURL();
|
|
Krzysztof Daniel |
65326ea |
List userBundles = SimpleConfiguratorUtils.readConfiguration(userConfigURL, base);
|
|
Krzysztof Daniel |
65326ea |
|
|
Krzysztof Daniel |
65326ea |
- return (userBundles.containsAll(sharedBundles)) ? userConfigURL : sharedConfigURL;
|
|
Krzysztof Daniel |
65326ea |
+ boolean useUserConfigArea = userBundles.containsAll(sharedBundles);
|
|
Krzysztof Daniel |
65326ea |
+ System.setProperty("org.eclipse.equinox.simpleconfigurator.shared.useUser", "" + System.currentTimeMillis());
|
|
Krzysztof Daniel |
65326ea |
+
|
|
Krzysztof Daniel |
65326ea |
+ return useUserConfigArea ? userConfigURL : sharedConfigURL;
|
|
Krzysztof Daniel |
65326ea |
}
|
|
Krzysztof Daniel |
65326ea |
} catch (MalformedURLException e) {
|
|
Krzysztof Daniel |
65326ea |
return null;
|
|
Krzysztof Daniel |
65326ea |
--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
|
|
Krzysztof Daniel |
65326ea |
+++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
|
|
Krzysztof Daniel |
65326ea |
@@ -236,8 +236,14 @@
|
|
Krzysztof Daniel |
65326ea |
if (SELF.equals(id))
|
|
Krzysztof Daniel |
65326ea |
id = self;
|
|
Krzysztof Daniel |
65326ea |
Profile profile = getProfileMap().get(id);
|
|
Krzysztof Daniel |
65326ea |
- if (profile == null && self != null && self.equals(id))
|
|
Krzysztof Daniel |
65326ea |
+ String s = System.getProperty("org.eclipse.equinox.simpleconfigurator.shared.useUser");
|
|
Krzysztof Daniel |
65326ea |
+ if (s != null && profile != null && (profile.getTimestamp() < new Long(s))) {
|
|
Krzysztof Daniel |
65326ea |
+ profile = null;
|
|
Krzysztof Daniel |
65326ea |
+ }
|
|
Krzysztof Daniel |
65326ea |
+ if (profile == null && self != null && self.equals(id)) {
|
|
Krzysztof Daniel |
65326ea |
profile = createSurrogateProfile(id);
|
|
Krzysztof Daniel |
65326ea |
+
|
|
Krzysztof Daniel |
65326ea |
+ }
|
|
Krzysztof Daniel |
65326ea |
|
|
Krzysztof Daniel |
65326ea |
return profile;
|
|
Krzysztof Daniel |
65326ea |
}
|