System.out.println(" + "+elements[i]); //$NON-NLS-1$
}
}
Hashtable cachedValue = newOptions == null ? null : new Hashtable(newOptions);
IEclipsePreferences defaultPreferences = getDefaultPreferences();
IEclipsePreferences instancePreferences = getInstancePreferences();
if (newOptions == null){
try {
instancePreferences.clear();
} catch(BackingStoreException e) {
// ignore
}
} else {
Enumeration keys = newOptions.keys();
while (keys.hasMoreElements()){
String key = (String)keys.nextElement();
int optionLevel = getOptionLevel(key);
if (optionLevel == UNKNOWN_OPTION) continue; // unrecognized option
if (key.equals(JavaCore.CORE_ENCODING)) {
if (cachedValue != null) {
cachedValue.put(key, JavaCore.getEncoding());
}
continue; // skipped, contributed by resource prefs
}
String value = (String) newOptions.get(key);
String defaultValue = defaultPreferences.get(key, null);
// Store value in preferences
if (defaultValue != null && defaultValue.equals(value)) {
value = null;
}
storePreference(key, value, instancePreferences);
}
try {
// persist options
instancePreferences.flush();
} catch(BackingStoreException e) {
// ignore
}
}
// update cache