Lines 1961-1971
Link Here
|
1961 |
// set options using preferences service lookup |
1961 |
// set options using preferences service lookup |
1962 |
Iterator iterator = this.optionNames.iterator(); |
1962 |
Iterator iterator = this.optionNames.iterator(); |
1963 |
while (iterator.hasNext()) { |
1963 |
while (iterator.hasNext()) { |
1964 |
String propertyName = (String) iterator.next(); |
1964 |
String propertyName = (String) iterator.next(); |
1965 |
String propertyValue = service.get(propertyName, null, this.preferencesLookup); |
1965 |
String propertyValue = service.get(propertyName, null, this.preferencesLookup); |
1966 |
if (propertyValue != null) { |
1966 |
if (propertyValue != null) { |
1967 |
options.put(propertyName, propertyValue); |
1967 |
options.put(propertyName, propertyValue); |
1968 |
} |
1968 |
} |
1969 |
} |
1969 |
} |
1970 |
|
1970 |
|
1971 |
// get encoding through resource plugin |
1971 |
// get encoding through resource plugin |
Lines 4516-4521
Link Here
|
4516 |
public void setOptions(Hashtable newOptions) { |
4516 |
public void setOptions(Hashtable newOptions) { |
4517 |
|
4517 |
|
4518 |
try { |
4518 |
try { |
|
|
4519 |
Hashtable cachedValue = newOptions == null ? null : new Hashtable(newOptions); |
4519 |
IEclipsePreferences defaultPreferences = getDefaultPreferences(); |
4520 |
IEclipsePreferences defaultPreferences = getDefaultPreferences(); |
4520 |
IEclipsePreferences instancePreferences = getInstancePreferences(); |
4521 |
IEclipsePreferences instancePreferences = getInstancePreferences(); |
4521 |
|
4522 |
|
Lines 4526-4532
Link Here
|
4526 |
while (keys.hasMoreElements()){ |
4527 |
while (keys.hasMoreElements()){ |
4527 |
String key = (String)keys.nextElement(); |
4528 |
String key = (String)keys.nextElement(); |
4528 |
if (!this.optionNames.contains(key)) continue; // unrecognized option |
4529 |
if (!this.optionNames.contains(key)) continue; // unrecognized option |
4529 |
if (key.equals(JavaCore.CORE_ENCODING)) continue; // skipped, contributed by resource prefs |
4530 |
if (key.equals(JavaCore.CORE_ENCODING)) { |
|
|
4531 |
if (cachedValue != null) { |
4532 |
cachedValue.put(key, JavaCore.getEncoding()); |
4533 |
} |
4534 |
continue; // skipped, contributed by resource prefs |
4535 |
} |
4530 |
String value = (String)newOptions.get(key); |
4536 |
String value = (String)newOptions.get(key); |
4531 |
String defaultValue = defaultPreferences.get(key, null); |
4537 |
String defaultValue = defaultPreferences.get(key, null); |
4532 |
if (defaultValue != null && defaultValue.equals(value)) { |
4538 |
if (defaultValue != null && defaultValue.equals(value)) { |
Lines 4541-4547
Link Here
|
4541 |
instancePreferences.flush(); |
4547 |
instancePreferences.flush(); |
4542 |
|
4548 |
|
4543 |
// update cache |
4549 |
// update cache |
4544 |
this.optionsCache = newOptions==null ? null : new Hashtable(newOptions); |
4550 |
this.optionsCache = cachedValue; |
4545 |
} catch (BackingStoreException e) { |
4551 |
} catch (BackingStoreException e) { |
4546 |
// ignore |
4552 |
// ignore |
4547 |
} |
4553 |
} |