IntPair (@NotNull BlockData blockData) { List<VcsFileRevision> selection = myList.getSelectedObjects(); if (selection.isEmpty()) return new IntPair(0, 0); int startIndex = blockData.getRevisions().indexOf(ContainerUtil.getFirstItem(selection)); int endIndex = blockData.getRevisions().indexOf(ContainerUtil.getLastItem(selection)); return new IntPair(startIndex, endIndex + 1); }