mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Erase code_formatter preference when disabling project specific settings
This commit is contained in:
parent
e363ba7f04
commit
c98b965760
2 changed files with 15 additions and 0 deletions
|
@ -173,4 +173,12 @@ public class CodeFormatterConfigurationBlock extends ProfileConfigurationBlock {
|
|||
}
|
||||
return super.performOk();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enableProjectSpecificSettings(boolean useProjectSpecificSettings) {
|
||||
if (fCustomCodeFormatterBlock != null) {
|
||||
fCustomCodeFormatterBlock.enableProjectSpecificSettings(useProjectSpecificSettings);
|
||||
}
|
||||
super.enableProjectSpecificSettings(useProjectSpecificSettings);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -116,6 +116,13 @@ public class CustomCodeFormatterBlock extends Observable {
|
|||
handleFormatterChanged();
|
||||
}
|
||||
|
||||
public void enableProjectSpecificSettings(boolean useProjectSpecificSettings) {
|
||||
if (useProjectSpecificSettings) {
|
||||
fPrefs.put(CCorePreferenceConstants.CODE_FORMATTER, fDefaultFormatterId);
|
||||
} else {
|
||||
initDefault();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the currently selected formatter id.
|
||||
|
|
Loading…
Add table
Reference in a new issue