@Override
    public void update(@NotNull AnActionEvent e) {
      boolean isOnBranch = and(myRepositories, GitRepository::isOnBranch);

      String description = isOnBranch
                           ? GitBundle.message("branches.rebase.onto",
                                               getCurrentBranchFullPresentation(myProject, myRepositories),
                                               getSelectedBranchFullPresentation(myBranchName))
                           : GitBundle.message("branches.rebase.is.not.possible.in.the.detached.head.state");
      Presentation presentation = e.getPresentation();
      presentation.setDescription(description);
      addTooltipText(presentation, description);
      presentation.setEnabled(isOnBranch);

      String actionText = GitBundle.message(
        "branches.rebase.onto",
        getCurrentBranchTruncatedPresentation(myProject, myRepositories),
        getSelectedBranchTruncatedPresentation(myProject, myBranchName));
      presentation.setText(actionText);
    }
@Override
    public void update(@NotNull AnActionEvent e)