@Override
  public @Nullable ActionGroup getCustomActionGroup() {
    DefaultActionGroup group = new DefaultActionGroup(getName(), ContainerUtil.map(getVariants(), s ->
      new ToggleAction(getVariantName(s), getVariantHint(s), null) {

      @Override
      public void update(@NotNull AnActionEvent e) {
        super.update(e);
        var description = getVariantDescription(s);

        if (description != null) {
          e.getPresentation().putClientProperty(ActionUtil.SECONDARY_TEXT, description);
        }
      }

      @Override
      public boolean isSelected(@NotNull AnActionEvent e) {
        return s.equals(mySelectedVariant);
      }

      @Override
      public @NotNull ActionUpdateThread getActionUpdateThread() {
        return ActionUpdateThread.BGT;
      }

      @Override
      public void setSelected(@NotNull AnActionEvent e, boolean state) {
        setSelectedVariant(s);
        fireEditorStateChanged();
        if (myToggleListener != null) {
          myToggleListener.accept(s);
        }
        logChange(state, e);
      }

      @Override
      public boolean isDumbAware() {
        return true;
      }
    })) {
      @Override
      public void update(@NotNull AnActionEvent e) {
        super.update(e);
        e.getPresentation().putClientProperty(ActionUtil.SECONDARY_TEXT, getVariantName(mySelectedVariant));
        e.getPresentation().setVisible(isRemovable());
      }

      @Override
      public @NotNull ActionUpdateThread getActionUpdateThread() {
        return ActionUpdateThread.EDT;
      }

      @Override
      public boolean isDumbAware() {
        return true;
      }
    };
    group.setPopup(true);
    return group;
  }
@Override
  public @Nullable ActionGroup getCustomActionGroup()