private void addActionButtonImpl(@NotNull AnAction action, int index) {
    if (action instanceof CustomComponentAction) {
      add(getCustomComponent(action), CUSTOM_COMPONENT_CONSTRAINT, index);
    }
    else {
      if (action instanceof ActionWithDelegate<?> wrapper &&
          wrapper.getDelegate() instanceof CustomComponentAction) {
        LOG.error("`CustomComponentAction` component is ignored due to wrapping: " +
                  Utils.operationName(action, null, myPlace));
      }
      add(createToolbarButton(action), ACTION_BUTTON_CONSTRAINT, index);
    }
  }
private void addActionButtonImpl(@NotNull AnAction action, int index)