/** @generated */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
      throws ExecutionException {
    if (!canExecute()) {
      throw new ExecutionException("Invalid arguments in create link command"); // $NON-NLS-1$
    }

    Substitution newElement = UMLFactory.eINSTANCE.createSubstitution();
    getContainer().getPackagedElements().add(newElement);
    newElement.getClients().add(getSource());
    newElement.getSuppliers().add(getTarget());
    ElementInitializers.getInstance().init_Substitution_4012(newElement);
    doConfigure(newElement, monitor, info);
    ((CreateElementRequest) getRequest()).setNewElement(newElement);
    return CommandResult.newOKCommandResult(newElement);
  }
  /** @generated */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
      throws ExecutionException {

    Component newElement = UMLFactory.eINSTANCE.createComponent();

    Package owner = (Package) getElementToEdit();
    owner.getPackagedElements().add(newElement);

    ElementInitializers.getInstance().init_Component_3071(newElement);

    doConfigure(newElement, monitor, info);

    ((CreateElementRequest) getRequest()).setNewElement(newElement);
    return CommandResult.newOKCommandResult(newElement);
  }