public void loadPrefs() {
    // cboxVarInterp.setSelected(prefs.getBoolean(PREF_VAR_INTERPRET, Boolean.TRUE));
    // cboxOverride.setSelected(prefs.getBoolean(PREF_OVERRIDE, Boolean.TRUE));
    // cboxAutoVerif.setSelected(prefs.getBoolean(PREF_VERIF, Boolean.TRUE));
    // cboxStrict.setSelected(prefs.getBoolean(PREF_STRICT, Boolean.FALSE));
    cboxFullAutocomplete.setSelected(prefs.getBoolean(PREF_FULL_AUTOCOMPLETE, Boolean.TRUE));
    cboxAutoClearOutput.setSelected(prefs.getBoolean(PREF_AUTOCLEAR_OUTPUT, true));

    boolean active = prefs.getBoolean(PREF_INDENT_SPACES, Boolean.FALSE);
    cboxSoft.setSelected(active);
    tfSpacesTab.setEnabled(active);

    tfSpacesTab.setValue("" + prefs.getInt(PREF_INDENT_SPACES_VALUE, 8));
  }
示例#2
0
  @Override
  protected ArrayList<String> loadEntry(String key) {
    if (preferences.nodeExists(key)) {
      final ArrayList<String> result = new ArrayList<String>();
      final XMLPreferences pref = preferences.node(key);

      // load size
      final int numFile = pref.getInt(ID_NB_FILE, 0);

      // load filenames
      for (int i = 0; i < numFile; i++) result.add(pref.get(ID_FILE + i, ""));

      return result;
    }

    return null;
  }