mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 18:55:38 +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) {
|
public void enableProjectSpecificSettings(boolean useProjectSpecificSettings) {
|
||||||
if (useProjectSpecificSettings) {
|
if (useProjectSpecificSettings) {
|
||||||
fPrefs.put(CCorePreferenceConstants.CODE_FORMATTER, fDefaultFormatterId);
|
if (fDefaultFormatterId != null)
|
||||||
|
fPrefs.put(CCorePreferenceConstants.CODE_FORMATTER, fDefaultFormatterId);
|
||||||
} else {
|
} else {
|
||||||
initDefault();
|
initDefault();
|
||||||
}
|
}
|
||||||
|
@ -125,7 +126,7 @@ public class CustomCodeFormatterBlock extends Observable {
|
||||||
/**
|
/**
|
||||||
* Returns the currently selected formatter id.
|
* 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() {
|
public String getFormatterId() {
|
||||||
if (fFormatterCombo == null) {
|
if (fFormatterCombo == null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue