Collection<Change> (@NotNull AnActionEvent e) { Project project = e.getRequiredData(CommonDataKeys.PROJECT); ChangesListView changesView = e.getData(ChangesListView.DATA_KEY); if (isPreferCheckboxesOverSelection() && changesView != null) { return filterIsInstance(changesView.getInclusionModel().getInclusion(), Change.class); } Change[] changes = e.getData(VcsDataKeys.CHANGES); if (changes != null) { return Arrays.asList(changes); } VirtualFile[] files = e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY); if (!ArrayUtil.isEmpty(files)) { ChangeListManager clmManager = ChangeListManager.getInstance(project); List<Change> result = new ArrayList<>(); for (VirtualFile vf : files) { result.addAll(clmManager.getChangesIn(vf)); } return result; } return emptyList(); }