private static @NotNull AnAction createTagGroup(@NotNull Project project,
                                                  @NotNull VcsRef ref,
                                                  @NotNull GitRepository repository,
                                                  boolean showTagsPopup) {
    ActionGroup singleRepoActions = createTagActions(project, Collections.singletonList(repository), ref);
    singleRepoActions.setPopup(false);

    String text = showTagsPopup ? ref.getName() : GitBundle.message("branches.tag.0", ref.getName());
    ActionGroup group = new DefaultActionGroup(singleRepoActions);
    group.getTemplatePresentation().setText(text, false);
    group.setPopup(true);
    return group;
  }
private static @NotNull AnAction createTagGroup(@NotNull Project project,
                                                  @NotNull VcsRef ref,
                                                  @NotNull GitRepository repository,
                                                  boolean showTagsPopup)