Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 e1172220..e707bfca 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 8e89785c..e9559a12 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