@NotNull
  private DefaultActionGroup fillActionGroup(boolean popup, DefaultActionGroup result) {
    if (popup) {
      result.add(ActionManager.getInstance().getAction(IdeActions.ACTION_EDIT_SOURCE));
    }

    result.add(ActionManager.getInstance().getAction(popup ? VCS_HISTORY_POPUP_ACTION_GROUP :
                                                     VCS_HISTORY_TOOLBAR_ACTION_GROUP));
    AnAction[] additionalActions = myProvider.getAdditionalActions(() -> {
      ApplicationManager.getApplication().invokeAndWait(() -> myRefresherI.refresh(true));
    });
    if (additionalActions != null) {
      for (AnAction additionalAction : additionalActions) {
        if (popup || additionalAction.getTemplatePresentation().getIcon() != null) {
          result.add(additionalAction);
        }
      }
    }
    result.add(ActionManager.getInstance().getAction(popup ? VCS_HISTORY_POPUP_PLUGIN_ACTION_GROUP :
                                                     VCS_HISTORY_TOOLBAR_PLUGIN_ACTION_GROUP));
    if (!myIsStaticAndEmbedded) {
      result.add(new MyShowDetailsAction());
    }

    if (!popup && myHistorySession.getHistoryAsTreeProvider() != null) {
      result.add(new MyShowAsTreeAction());
    }

    return result;
  }
@NotNull
  private DefaultActionGroup fillActionGroup(boolean popup, DefaultActionGroup result)