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

      Presentation presentation = e.getPresentation();
      presentation.setText(DvcsBundle.messagePointer("compare.branches.diff.panel.get.from.branch.action"));
      presentation.setDescription(DvcsBundle.messagePointer("compare.branches.diff.panel.get.from.branch.action.description",
                                                            panel.myBranchName));

      boolean isEnabled = !panel.myChangesBrowser.getSelectedChanges().isEmpty();
      boolean isVisible = panel.myCompareInfo instanceof LocalCommitCompareInfo;
      presentation.setEnabled(isEnabled && isVisible);
      presentation.setVisible(isVisible);
    }
@Override
    public void update(@NotNull AnActionEvent e)