void (@NotNull DataContext dataContext) { StringBuilder sb = new StringBuilder(); List<Integer> visibleColumns = getVisibleColumnIndices(); int[] selectedRows = getSelectedRows(); for (int i = 0; i < Math.min(VcsLogUtil.MAX_SELECTED_COMMITS, selectedRows.length); i++) { int row = selectedRows[i]; sb.append(StringUtil.join(visibleColumns, j -> { if (j == VcsLogColumnManager.getInstance().getModelIndex(Root.INSTANCE)) { return ""; } else { return getModel().getValueAt(row, j).toString(); } }, " ")); if (i != selectedRows.length - 1) sb.append("\n"); } CopyPasteManager.getInstance().setContents(new StringSelection(sb.toString())); }