/*
   * @see IPreferencePage#performOk()
   */
  @Override
  public boolean performOk() {
    IPreferenceStore store = getPreferenceStore();
    for (int i = 0; i < fCheckBoxes.size(); i++) {
      Button button = fCheckBoxes.get(i);
      String key = (String) button.getData();
      store.setValue(key, button.getSelection());
    }
    for (int i = 0; i < fRadioButtons.size(); i++) {
      Button button = fRadioButtons.get(i);
      if (button.getSelection()) {
        String[] info = (String[]) button.getData();
        store.setValue(info[0], info[1]);
      }
    }
    for (int i = 0; i < fTextControls.size(); i++) {
      Text text = fTextControls.get(i);
      String key = (String) text.getData();
      store.setValue(key, text.getText());
    }

    if (fJRECombo != null) {
      store.setValue(CLASSPATH_JRELIBRARY_INDEX, fJRECombo.getSelectionIndex());
    }

    JavaPlugin.flushInstanceScope();
    return super.performOk();
  }
  /*
   * @see PreferencePage#performDefaults()
   */
  @Override
  protected void performDefaults() {
    IPreferenceStore store = getPreferenceStore();
    for (int i = 0; i < fCheckBoxes.size(); i++) {
      Button button = fCheckBoxes.get(i);
      String key = (String) button.getData();
      button.setSelection(store.getDefaultBoolean(key));
    }
    for (int i = 0; i < fRadioButtons.size(); i++) {
      Button button = fRadioButtons.get(i);
      String[] info = (String[]) button.getData();
      button.setSelection(info[1].equals(store.getDefaultString(info[0])));
    }
    for (int i = 0; i < fTextControls.size(); i++) {
      Text text = fTextControls.get(i);
      String key = (String) text.getData();
      text.setText(store.getDefaultString(key));
    }
    if (fJRECombo != null) {
      fJRECombo.select(store.getDefaultInt(CLASSPATH_JRELIBRARY_INDEX));
    }

    validateFolders();
    super.performDefaults();
  }