@Override
    public void actionPerformed(@NotNull AnActionEvent e) {
      CompareBranchesDiffPanel panel = e.getData(DATA_KEY);
      if (panel == null) return;

      Project project = panel.myProject;
      List<Change> changes = panel.myChangesBrowser.getSelectedChanges();
      boolean swapSides = panel.myVcsSettings.shouldSwapSidesInCompareBranches();
      CommitCompareInfo compareInfo = panel.myCompareInfo;

      String title = DvcsBundle.message("compare.branches.diff.panel.get.from.branch.title", panel.myBranchName);
      ReplaceFileConfirmationDialog confirmationDialog = new ReplaceFileConfirmationDialog(project, title);
      if (!confirmationDialog.confirmFor(ChangesUtil.getFilesFromChanges(changes))) return;

      FileDocumentManager.getInstance().saveAllDocuments();
      LocalHistoryAction action = LocalHistory.getInstance().startAction(VcsBundle.message("activity.name.get.from", panel.myBranchName),
                                                                         VcsActivity.Get);

      new Task.Modal(project, DvcsBundle.message("compare.branches.diff.panel.loading.content.from.branch.process"), false) {
        @Override
        public void run(@NotNull ProgressIndicator indicator) {
          try {
            if (compareInfo != null) {
              ((LocalCommitCompareInfo)compareInfo).copyChangesFromBranch(changes, swapSides);
            }
          }
          catch (VcsException err) {
            ApplicationManager.getApplication().invokeLater(() -> Messages.showErrorDialog(myProject, err.getMessage(), DvcsBundle
              .message("compare.branches.diff.panel.can.not.copy.changes.error")));
          }
        }

        @Override
        public void onFinished() {
          action.finish();

          panel.refreshView(false);
        }
      }.queue();
    }
@Override
    public void actionPerformed(@NotNull AnActionEvent e)