private List<Parameter> getCurrentParameters() {
    List<Parameter> parameters = new ArrayList<Parameter>();

    for (int i = 0; i < parametersPanel.getWidgetCount(); i++) {
      HorizontalPanel entry = (HorizontalPanel) parametersPanel.getWidget(i);
      parameters.add(new Parameter(getParameterKey(entry), getParameterValue(entry)));
    }
    return parameters;
  }
  private void refreshParameters() {
    getSelectedConfiguration().clearParameters();

    for (int i = parametersPanel.getWidgetCount() - 1; i >= 0; i--) {
      HorizontalPanel entry = (HorizontalPanel) parametersPanel.getWidget(i);
      String key = getParameterKey(entry);

      if (mustDiscardParameter(key)) removeParameter(entry);
      else getSelectedConfiguration().addParameter(new Parameter(key, getParameterValue(entry)));
    }
  }
 private void removeParameter(HorizontalPanel entry) {
   parametersPanel.remove(entry);
 }
 private void addParameter(String key, String value) {
   parametersPanel.add(buildParameterEntry(key, value));
 }
 private void clearParameters() {
   parametersPanel.clear();
 }