private DefaultActionGroup createGearPopupGroup() {
    DefaultActionGroup group = new DefaultActionGroup();

    group.add(myManager.createGearActions());
    if (myManager.getAnchor() == null) {
      group.addSeparator();
      DefaultActionGroup viewModeGroup = DefaultActionGroup.createPopupGroup(() -> ActionsBundle.groupText("TW.ViewModeGroup"));
      for (ToolWindowViewModeAction.ViewMode viewMode : ToolWindowViewModeAction.ViewMode.values()) {
        viewModeGroup.add(new MyViewModeAction(viewMode));
      }
      group.add(viewModeGroup);
    }
    return group;
  }
private DefaultActionGroup createGearPopupGroup()