@Override
  public void actionPerformed(@NotNull AnActionEvent e) {
    Project project = e.getData(CommonDataKeys.PROJECT);
    if (project == null) return;
    VcsFileRevision[] revisions = e.getData(VcsDataKeys.VCS_FILE_REVISIONS);
    if (revisions == null) return;
    FilePath filePath = e.getData(VcsDataKeys.FILE_PATH);
    if (filePath == null) return;
    VcsHistoryProvider provider = e.getData(VcsDataKeys.HISTORY_PROVIDER);
    if (provider == null) return;

    DiffFromHistoryHandler customDiffHandler = provider.getHistoryDiffHandler();
    DiffFromHistoryHandler diffHandler = customDiffHandler == null ? new StandardDiffFromHistoryHandler() : customDiffHandler;

    if (revisions.length == 2) {
      diffHandler.showDiffForTwo(project, filePath, revisions[1], revisions[0]);
    }
    else if (revisions.length == 1) {
      VcsFileRevision previousRevision = e.getData(FileHistoryPanelImpl.PREVIOUS_REVISION_FOR_DIFF);
      if (previousRevision != null && revisions[0] != null) {
        diffHandler.showDiffForOne(e, project, filePath, previousRevision, revisions[0]);
      }
    }
  }
@Override
  public void actionPerformed(@NotNull AnActionEvent e)