public void selectItem(final @NotNull T item) {
    table.clearSelection();

    Ref<T> ref;
    if (helper.hasModifiedItems()) {
      ref = Ref.create();
      helper.process((modified, original) -> {
        if (item == original) {
          ref.set(modified);
        }
        return ref.isNull();
      });
    }
    else {
      ref = null;
    }

    table.addSelection(ref == null || ref.isNull() ? item : ref.get());
  }
public void selectItem(final @NotNull T item)