public void setComponent(@Nullable Object c) {
    myComponent = c;
    myComponentType =
      c instanceof Separator ? TYPE_SEPARATOR :
      c instanceof String || c instanceof AnAction ? TYPE_ACTION :
      c instanceof Group o ? (o.isForceShowAsPopup() ? TYPE_POPUP_GROUP : TYPE_GROUP) :
      TYPE_NONE;
    myComponentId =
      c instanceof String o ? o :
      c instanceof Group o ? (StringUtil.isEmpty(o.getId()) ? o.getName() : o.getId()) :
      null;
  }
public void setComponent(@Nullable Object c)