Collection<VirtualFile> () { Collection<VirtualFile> roots = myLogData.getRoots(); if (roots.size() == 1) return roots; int[] selectedRows = myGraphTable.getSelectedRows(); if (selectedRows.length == 0 || selectedRows.length > VcsLogUtil.MAX_SELECTED_COMMITS) { return VcsLogUtil.getAllVisibleRoots(roots, myFilterUi.getFilters()); } return ContainerUtil.map2Set(Ints.asList(selectedRows), row -> myGraphTable.getModel().getRootAtRow(row)); }