private void addSelectionListener(@NotNull SelectionListener listener) {
    table.getSelectionModel().addListSelectionListener(e -> {
      if (e.getValueIsAdjusting()) return;

      ListSelectionModel sm = table.getSelectionModel();
      int selectedRow1 = sm.getMinSelectionIndex();
      int selectedRow2 = sm.getMaxSelectionIndex();

      FilteringTableModel<?> model = getFilteringModel();
      int origRow1 = model.getOriginalIndex(selectedRow1);
      int origRow2 = model.getOriginalIndex(selectedRow2);
      listener.revisionsSelected(origRow1, origRow2);
    });
  }
private void addSelectionListener(@NotNull SelectionListener listener)