@Override
  public void actionPerformed(@NotNull AnActionEvent event) {
    Project project = event.getData(CommonDataKeys.PROJECT);
    if (project == null) return;
    AbstractVcs vcs = Objects.requireNonNull(getVcs(project, event.getData(VcsDataKeys.VCS)));

    Pair<FilePath, VcsRevisionNumber> fileAndRevision = Objects.requireNonNull(getFileAndRevision(event));
    FilePath file = fileAndRevision.getFirst();
    VcsRevisionNumber revisionNumber = fileAndRevision.getSecond();

    String revisionNumberString = revisionNumber.asString();
    if (canShowNewFileHistory(project, file, revisionNumberString)) {
      showNewFileHistory(project, file, revisionNumberString);
    }
    else {
      VcsHistoryProviderEx vcsHistoryProvider = Objects.requireNonNull((VcsHistoryProviderEx)vcs.getVcsHistoryProvider());
      AbstractVcsHelperImpl helper = Objects.requireNonNull(getVcsHelper(project));
      helper.showFileHistory(vcsHistoryProvider, file, vcs, revisionNumber);
    }
  }
@Override
  public void actionPerformed(@NotNull AnActionEvent event)