Update configuration parsing

This commit is contained in:
emmanue1 2019-12-25 15:39:11 +01:00
parent 7bca465ca3
commit a0fa89c78f
2 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ public class ClassFileDecompilerPreferencesProvider extends JPanel implements Pr
@Override
public void loadPreferences(Map<String, String> preferences) {
escapeUnicodeCharactersCheckBox.setSelected("true".equals(preferences.get(ESCAPE_UNICODE_CHARACTERS)));
realignLineNumbersCheckBox.setSelected(!"false".equals(preferences.get(REALIGN_LINE_NUMBERS)));
realignLineNumbersCheckBox.setSelected("true".equals(preferences.get(REALIGN_LINE_NUMBERS)));
}
@Override

View File

@ -64,7 +64,7 @@ public class ClassFilePage extends TypePage {
strings.clear();
// Init preferences
boolean realignmentLineNumbers = getPreferenceValue(preferences, REALIGN_LINE_NUMBERS, true);
boolean realignmentLineNumbers = getPreferenceValue(preferences, REALIGN_LINE_NUMBERS, false);
boolean unicodeEscape = getPreferenceValue(preferences, ESCAPE_UNICODE_CHARACTERS, false);
Map<String, Object> configuration = new HashMap<>();
@ -116,7 +116,7 @@ public class ClassFilePage extends TypePage {
try {
// Init preferences
Map<String, String> preferences = api.getPreferences();
boolean realignmentLineNumbers = getPreferenceValue(preferences, REALIGN_LINE_NUMBERS, true);
boolean realignmentLineNumbers = getPreferenceValue(preferences, REALIGN_LINE_NUMBERS, false);
boolean unicodeEscape = getPreferenceValue(preferences, ESCAPE_UNICODE_CHARACTERS, false);
boolean showLineNumbers = getPreferenceValue(preferences, WRITE_LINE_NUMBERS, true);