private static boolean hasReversibleFiles(@NotNull AnActionEvent e) {
    Project project = e.getRequiredData(CommonDataKeys.PROJECT);
    ChangeListManager clmManager = ChangeListManager.getInstance(project);

    if (!clmManager.getAllChanges().isEmpty()) {
      return true;
    }

    List<FilePath> missingFiles = e.getData(ChangesListView.MISSING_FILES_DATA_KEY);
    if (!ContainerUtil.isEmpty(missingFiles)) {
      return true;
    }

    Set<VirtualFile> modifiedWithoutEditing = getModifiedWithoutEditing(e, project);
    if (!ContainerUtil.isEmpty(modifiedWithoutEditing)) {
      return true;
    }

    return false;
  }
private static boolean hasReversibleFiles(@NotNull AnActionEvent e)