mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 10:45:37 +02:00
Bug 425595 - Opening 'C/C++ General-> Formatter' of a project properties
cuases NPE
This commit is contained in:
parent
6891ce8e0f
commit
74c0954dc8
1 changed files with 3 additions and 2 deletions
|
@ -116,7 +116,8 @@ public class CustomCodeFormatterBlock extends Observable {
|
|||
|
||||
public void enableProjectSpecificSettings(boolean useProjectSpecificSettings) {
|
||||
if (useProjectSpecificSettings) {
|
||||
fPrefs.put(CCorePreferenceConstants.CODE_FORMATTER, fDefaultFormatterId);
|
||||
if (fDefaultFormatterId != null)
|
||||
fPrefs.put(CCorePreferenceConstants.CODE_FORMATTER, fDefaultFormatterId);
|
||||
} else {
|
||||
initDefault();
|
||||
}
|
||||
|
@ -125,7 +126,7 @@ public class CustomCodeFormatterBlock extends Observable {
|
|||
/**
|
||||
* Returns the currently selected formatter id.
|
||||
*
|
||||
* @return the selected formatter id or <code>null</code> if the default is selected.
|
||||
* @return the selected formatter id or {@code null} if the default is selected.
|
||||
*/
|
||||
public String getFormatterId() {
|
||||
if (fFormatterCombo == null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue