Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2017-01-26 21:32:00 +0000
committerSergey Prigogin2017-01-26 21:32:04 +0000
commit23f9b744c1083eb4fcba8e45da70fa10d2670dd3 (patch)
tree75a0f626c6c1bef564479e2241ce5e8f10fb3750
parent3222530685459254c76e866cc6ecfc88fd44974f (diff)
downloadrt.equinox.bundles-I20170130-2000.tar.gz
rt.equinox.bundles-I20170130-2000.tar.xz
rt.equinox.bundles-I20170130-2000.zip
Revert "Bug 387898 - Wrong preference node created when starting org.eclipse.jdt.debug.ui plugin" This reverts commit 92ae5195ee7a7685524798f74948b8fcbfeb7ccd. Change-Id: I649d614db68c6f51d2d57aa002db5c2984d79345 Signed-off-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java18
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java14
2 files changed, 7 insertions, 25 deletions
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java
index e11722204..e707bfca5 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java
@@ -170,23 +170,7 @@ public class DefaultPreferences extends EclipsePreferences {
// if the node already exists, nothing more to do
if (super.nodeExists(path))
return true;
-
- // try to apply runtime defaults in case the node is created programmatically inside initializer
- PreferencesService.getDefault().applyRuntimeDefaults(path, pluginReference);
- // check if the node was created inside initializer's code
- if (super.nodeExists(path))
- return true;
-
- // try to look for preferences.ini file inside bundle
- Bundle bundle = PreferencesOSGiUtils.getDefault().getBundle(path);
- if (bundle != null) {
- URL url = FileLocator.find(bundle, new Path(IPreferencesConstants.PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME), null);
- // node exists only if file exists and if it contains some preferences
- if (!loadProperties(url).isEmpty())
- return true;
- }
-
- // check product and command line customizations
+ // if the node does not exist, maybe it has not been loaded yet
initializeCustomizations();
// scope based path is a path relative to the "/default" node; this is the path that appears in customizations
IPath scopeBasedPath = new Path(absolutePath() + PATH_SEPARATOR + path).removeFirstSegments(1);
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java
index 8e89785cd..e9559a12b 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java
@@ -605,21 +605,19 @@ public class PreferencesService implements IPreferencesService {
Preferences node = context.getNode(qualifier);
if (node != null) {
found = true;
- if (childPath != null && node.nodeExists(childPath))
+ if (childPath != null)
node = node.node(childPath);
result.add(node);
}
}
}
if (!found) {
- Preferences node = getRootNode().node(scopeString);
- if (node.nodeExists(qualifier)) {
- node = node.node(qualifier);
- if (childPath != null && node.nodeExists(childPath))
- node = node.node(childPath);
- result.add(node);
- }
+ Preferences node = getRootNode().node(scopeString).node(qualifier);
+ if (childPath != null)
+ node = node.node(childPath);
+ result.add(node);
}
+ found = false;
}
@Override

Back to the top