Renamed editor.auto_close_braces pref and set default value

This commit is contained in:
Cristian Maglie 2017-04-13 11:35:07 +02:00 committed by Cristian Maglie
parent 8ecbded312
commit 00c1a3b3eb
3 changed files with 10 additions and 4 deletions

View File

@ -148,7 +148,7 @@ public class EditorTab extends JPanel implements SketchFile.TextStorage {
textArea.setMarginLineEnabled(false);
textArea.setCodeFoldingEnabled(PreferencesData.getBoolean("editor.code_folding"));
textArea.setAutoIndentEnabled(PreferencesData.getBoolean("editor.indent"));
textArea.setCloseCurlyBraces(PreferencesData.getBoolean("editor.autocomplete"));
textArea.setCloseCurlyBraces(PreferencesData.getBoolean("editor.auto_close_braces", true));
textArea.setAntiAliasingEnabled(PreferencesData.getBoolean("editor.antialias"));
textArea.setTabsEmulated(PreferencesData.getBoolean("editor.tabs.expand"));
textArea.setTabSize(PreferencesData.getInteger("editor.tabs.size"));

View File

@ -176,6 +176,13 @@ public class PreferencesData {
prefs.remove(attribute);
}
static public boolean getBoolean(String attribute, boolean defaultValue) {
if (has(attribute)) {
return getBoolean(attribute);
}
return defaultValue;
}
static public boolean getBoolean(String attribute) {
return prefs.getBoolean(attribute);

View File

@ -146,9 +146,8 @@ editor.tabs.size = 2
# automatically indent each line
editor.indent = true
# enable/disable any 'autocomplete' features
# this currently includes 'auto curly brace'
editor.autocomplete = true
# enable/disable auto-close of curly brace
editor.auto_close_braces = true
# size of divider between editing area and the console
editor.divider.size = 0