@Override
  public void writeExternal(Element element) throws WriteExternalException {
    for (String s : myGroupPath) {
      Element path = new Element(PATH);
      path.setAttribute(VALUE, s);
      element.addContent(path);
    }
    switch (myComponentType) {
      case TYPE_SEPARATOR ->
        element.setAttribute(SEPARATOR, Boolean.TRUE.toString());
      case TYPE_ACTION -> {
        element.setAttribute(VALUE, StringUtil.notNullize(myComponentId));
        element.setAttribute(IS_ACTION, Boolean.TRUE.toString());
      }
      case TYPE_GROUP, TYPE_POPUP_GROUP -> {
        element.setAttribute(VALUE, StringUtil.notNullize(myComponentId));
        element.setAttribute(IS_GROUP, Boolean.TRUE.toString());
        element.setAttribute(FORCE_POPUP, Boolean.toString(myComponentType == TYPE_POPUP_GROUP));
      }
    }
    element.setAttribute(ACTION_TYPE, Integer.toString(myActionType));
    element.setAttribute(POSITION, Integer.toString(myAbsolutePosition));
    DefaultJDOMExternalizer.writeExternal(this, element);
  }
@Override
  public void writeExternal(Element element)