public @NotNull CheckBoxListModelEditor<T> copyAction(final @NotNull Consumer<? super T> consumer) {
    toolbarDecorator.addExtraAction(new DumbAwareAction(IdeBundle.message("button.copy"), null, PlatformIcons.COPY_ICON) {
      @Override
      public void actionPerformed(@NotNull AnActionEvent e) {
        int[] indices = list.getSelectedIndices();
        if (indices == null) {
          return;
        }

        for (int index : indices) {
          T item = list.getItemAt(index);
          if (item != null) {
            consumer.consume(item);
          }
        }
      }
      @Override
      public @NotNull ActionUpdateThread getActionUpdateThread() {
        return ActionUpdateThread.EDT;
      }

      @Override
      public void update(@NotNull AnActionEvent e) {
        e.getPresentation().setEnabled(list.getSelectedIndex() > -1);
      }
    });
    return this;
  }
public @NotNull CheckBoxListModelEditor<T> copyAction(final @NotNull Consumer<? super T> consumer)