/**
   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that
   * can be created under this object.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
    super.collectNewChildDescriptors(newChildDescriptors, object);

    newChildDescriptors.add(
        createChildParameter(
            MenuPackageImpl.Literals.HANDLED_ITEM__PARAMETERS,
            MCommandsFactory.INSTANCE.createParameter()));
  }
  protected void handleAdd() {
    MParameter handler = MCommandsFactory.INSTANCE.createParameter();
    setElementId(handler);

    Command cmd =
        AddCommand.create(
            getEditingDomain(),
            getMaster().getValue(),
            MenuPackageImpl.Literals.HANDLED_ITEM__PARAMETERS,
            handler);

    if (cmd.canExecute()) {
      getEditingDomain().getCommandStack().execute(cmd);
      getEditor().setSelection(handler);
    }
  }
  protected void handleAddCommandParameter() {
    MCommandParameter param = MCommandsFactory.INSTANCE.createCommandParameter();
    setElementId(param);

    Command cmd =
        AddCommand.create(
            getEditingDomain(),
            getMaster().getValue(),
            CommandsPackageImpl.Literals.COMMAND__PARAMETERS,
            param);

    if (cmd.canExecute()) {
      getEditingDomain().getCommandStack().execute(cmd);
      getEditor().setSelection(param);
    }
  }