private static @NotNull Collection<? extends Change> getSelectedChanges(@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)) {
      Collection<Change> allChanges = ChangeListManager.getInstance(project).getAllChanges();
      return VcsImplUtil.filterChangesUnderFiles(allChanges, List.of(files)).toList();
    }

    return emptyList();
  }
private static @NotNull Collection<? extends Change> getSelectedChanges(@NotNull AnActionEvent e)