ListSelection<Change> (@NotNull DataProvider dataProvider) { Change[] selectedChanges = VcsDataKeys.SELECTED_CHANGES.getData(dataProvider); if (selectedChanges != null) { return ListSelection.createAt(Arrays.asList(selectedChanges), 0) .asExplicitSelection(); } Change[] changes = VcsDataKeys.CHANGES.getData(dataProvider); if (changes != null) { return ListSelection.createAt(Arrays.asList(changes), 0); } return null; }