Lines 4788-4797
Link Here
|
4788 |
* @param optionValue The value of the option. If <code>null</code>, then |
4788 |
* @param optionValue The value of the option. If <code>null</code>, then |
4789 |
* the option will be removed from the preferences instead. |
4789 |
* the option will be removed from the preferences instead. |
4790 |
* @param eclipsePreferences The eclipse preferences to be updated |
4790 |
* @param eclipsePreferences The eclipse preferences to be updated |
|
|
4791 |
* @param otherOptions more options being stored, used to avoid conflict between deprecated option and its compatible |
4791 |
* @return <code>true</code> if the preferences have been changed, |
4792 |
* @return <code>true</code> if the preferences have been changed, |
4792 |
* <code>false</code> otherwise. |
4793 |
* <code>false</code> otherwise. |
4793 |
*/ |
4794 |
*/ |
4794 |
public boolean storePreference(String optionName, String optionValue, IEclipsePreferences eclipsePreferences) { |
4795 |
public boolean storePreference(String optionName, String optionValue, IEclipsePreferences eclipsePreferences, Map otherOptions) { |
4795 |
int optionLevel = this.getOptionLevel(optionName); |
4796 |
int optionLevel = this.getOptionLevel(optionName); |
4796 |
if (optionLevel == UNKNOWN_OPTION) return false; // unrecognized option |
4797 |
if (optionLevel == UNKNOWN_OPTION) return false; // unrecognized option |
4797 |
|
4798 |
|
Lines 4809-4814
Link Here
|
4809 |
eclipsePreferences.remove(optionName); // get rid off old preference |
4810 |
eclipsePreferences.remove(optionName); // get rid off old preference |
4810 |
String[] compatibleOptions = (String[]) this.deprecatedOptions.get(optionName); |
4811 |
String[] compatibleOptions = (String[]) this.deprecatedOptions.get(optionName); |
4811 |
for (int co=0, length=compatibleOptions.length; co < length; co++) { |
4812 |
for (int co=0, length=compatibleOptions.length; co < length; co++) { |
|
|
4813 |
if (otherOptions != null && otherOptions.containsKey(compatibleOptions[co])) |
4814 |
continue; // don't overwrite explicit value of otherOptions at compatibleOptions[co] |
4812 |
if (optionValue == null) { |
4815 |
if (optionValue == null) { |
4813 |
eclipsePreferences.remove(compatibleOptions[co]); |
4816 |
eclipsePreferences.remove(compatibleOptions[co]); |
4814 |
} else { |
4817 |
} else { |
Lines 4862-4868
Link Here
|
4862 |
if (defaultValue != null && defaultValue.equals(value)) { |
4865 |
if (defaultValue != null && defaultValue.equals(value)) { |
4863 |
value = null; |
4866 |
value = null; |
4864 |
} |
4867 |
} |
4865 |
storePreference(key, value, instancePreferences); |
4868 |
storePreference(key, value, instancePreferences, newOptions); |
4866 |
} |
4869 |
} |
4867 |
try { |
4870 |
try { |
4868 |
// persist options |
4871 |
// persist options |