@Override
  public void uiDataSnapshot(@NotNull DataSink sink) {
    int[] selectedRows = getSelectedRows();
    Set<VirtualFile> roots = selectedRows.length == 0 || selectedRows.length > VcsLogUtil.MAX_SELECTED_COMMITS ? emptySet() :
                             ContainerUtil.map2SetNotNull(Ints.asList(selectedRows), row -> getModel().getRootAtRow(row));
    sink.set(PlatformDataKeys.COPY_PROVIDER, this);
    sink.set(VcsLogInternalDataKeys.VCS_LOG_GRAPH_TABLE, this);

    if (roots.size() == 1) {
      sink.set(VcsDataKeys.VCS, myLogData.getLogProvider(Objects.requireNonNull(getFirstItem(roots))).getSupportedVcs());
    }
    if (selectedRows.length == 1) {
      sink.set(VcsLogDataKeys.VCS_LOG_BRANCHES, getModel().getBranchesAtRow(selectedRows[0]));
      sink.set(VcsLogDataKeys.VCS_LOG_REFS, getModel().getRefsAtRow(selectedRows[0]));
    }
    if (selectedRows.length != 0) {
      StringBuilder sb = new StringBuilder();
      for (int i = 0; i < Math.min(VcsLogUtil.MAX_SELECTED_COMMITS, selectedRows.length); i++) {
        sb.append(getModel().getValueAt(selectedRows[i], Commit.INSTANCE));
        if (i != selectedRows.length - 1) sb.append("\n");
      }
      sink.set(VcsDataKeys.PRESET_COMMIT_MESSAGE, sb.toString());
    }
  }
@Override
  public void uiDataSnapshot(@NotNull DataSink sink)