public void addRemoveButtonForAnt(final Condition<? super T> removeCondition, @NlsActions.ActionText String actionName) {
    final ReorderableListController<T>.RemoveActionDescription description = myForm.getListActionsBuilder().addRemoveAction(actionName);
    description.addPostHandler(new ReorderableListController.ActionNotification<>() {
      @Override
      public void afterActionPerformed(List<T> list) {
        for (T item : list) {
          if (myAdded.contains(item)) {
            myAdded.remove(item);
          }
          else {
            myRemoved.add(item);
          }
        }
      }
    });
    description.setEnableCondition(removeCondition);
    description.setConfirmation(list -> {
      if (list.size() == 1) {
        return Messages.showOkCancelDialog(description.getList(),
                                           AntBundle.message("delete.selected.ant.configuration.confirmation.text"),
                                           AntBundle.message("delete.confirmation.dialog.title"),
                                           Messages.getQuestionIcon()) == Messages.OK;
      } else {
        return Messages.showOkCancelDialog(description.getList(),
                                           AntBundle.message("delete.selected.ant.configurations.confirmation.text"),
                                           AntBundle.message("delete.confirmation.dialog.title"),
                                           Messages.getQuestionIcon()) == Messages.OK;
      }
    });

    description.setShowText(true);
  }
public void addRemoveButtonForAnt(final Condition<? super T> removeCondition, @NlsActions.ActionText String actionName)