@Override
  public void update(@NotNull AnActionEvent e) {
    VcsFileRevision[] selectedRevisions = e.getData(VcsDataKeys.VCS_FILE_REVISIONS);
    VirtualFile virtualFile = e.getData(CommonDataKeys.VIRTUAL_FILE);
    VcsHistorySession historySession = e.getData(VcsDataKeys.HISTORY_SESSION);

    e.getPresentation().setVisible(true);
    e.getPresentation().setEnabled(selectedRevisions != null && selectedRevisions.length == 1 && virtualFile != null &&
                                   historySession != null && historySession.getCurrentRevisionNumber() != null &&
                                   historySession.isContentAvailable(selectedRevisions[0]) &&
                                   e.getData(VcsDataKeys.FILE_PATH) != null && e.getData(VcsDataKeys.HISTORY_PROVIDER) != null &&
                                   e.getData(CommonDataKeys.PROJECT) != null);
  }
@Override
  public void update(@NotNull AnActionEvent e)