public void useProjectSpecificSettings(boolean enable) {
boolean hasProjectSpecificOption = fDisabledProjectSettings == null;
if (enable != hasProjectSpecificOption && fProject != null) {
if (enable) {
for (int i = 0; i < fAllKeys.length; i++) {
Key curr = fAllKeys[i];
String val = (String) fDisabledProjectSettings.get(curr);
curr.setStoredValue(fLookupOrder[0], val, fManager);
}
fDisabledProjectSettings = null;
updateControls();
} else {
fDisabledProjectSettings = new IdentityHashMap();
for (int i = 0; i < fAllKeys.length; i++) {
Key curr = fAllKeys[i];
String oldSetting = curr.getStoredValue(fLookupOrder,
false, fManager);
fDisabledProjectSettings.put(curr, oldSetting);
curr.setStoredValue(fLookupOrder[0], null, fManager); // clear
// project
// settings
}
}
}