Package org.eclipse.gmf.runtime.common.core.command

Examples of org.eclipse.gmf.runtime.common.core.command.ICommand


   * @generated
   */
  private Command getEditHelperCommand(IEditCommandRequest request,
      Command editPolicyCommand) {
    if (editPolicyCommand != null) {
      ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy) editPolicyCommand)
          .getICommand()
          : new CommandProxy(editPolicyCommand);
      request
          .setParameter(
              eu.admire.visual.pmml._40.diagram.edit.helpers.PMMLBaseEditHelper.EDIT_POLICY_COMMAND,
              command);
    }
    IElementType requestContextElementType = getContextElementType(request);
    request
        .setParameter(
            eu.admire.visual.pmml._40.diagram.edit.helpers.PMMLBaseEditHelper.CONTEXT_ELEMENT_TYPE,
            requestContextElementType);
    ICommand command = requestContextElementType.getEditCommand(request);
    request
        .setParameter(
            eu.admire.visual.pmml._40.diagram.edit.helpers.PMMLBaseEditHelper.EDIT_POLICY_COMMAND,
            null);
    request
        .setParameter(
            eu.admire.visual.pmml._40.diagram.edit.helpers.PMMLBaseEditHelper.CONTEXT_ELEMENT_TYPE,
            null);
    if (command != null) {
      if (!(command instanceof CompositeTransactionalCommand)) {
        command = new CompositeTransactionalCommand(getEditingDomain(),
            command.getLabel()).compose(command);
      }
      return new ICommandProxy(command);
    }
    return editPolicyCommand;
  }
View Full Code Here


    ConfigureRequest configureRequest = new ConfigureRequest(
        getEditingDomain(), newElement, elementType);
    configureRequest.setClientContext(((CreateElementRequest) getRequest())
        .getClientContext());
    configureRequest.addParameters(getRequest().getParameters());
    ICommand configureCommand = elementType
        .getEditCommand(configureRequest);
    if (configureCommand != null && configureCommand.canExecute()) {
      configureCommand.execute(monitor, info);
    }
  }
View Full Code Here

    ConfigureRequest configureRequest = new ConfigureRequest(
        getEditingDomain(), newElement, elementType);
    configureRequest.setClientContext(((CreateElementRequest) getRequest())
        .getClientContext());
    configureRequest.addParameters(getRequest().getParameters());
    ICommand configureCommand = elementType
        .getEditCommand(configureRequest);
    if (configureCommand != null && configureCommand.canExecute()) {
      configureCommand.execute(monitor, info);
    }
  }
View Full Code Here

   * @generated
   */
  private Command getEditHelperCommand(IEditCommandRequest request,
      Command editPolicyCommand) {
    if (editPolicyCommand != null) {
      ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy) editPolicyCommand)
          .getICommand()
          : new CommandProxy(editPolicyCommand);
      request
          .setParameter(
              eu.admire.visual.pmml.neuralnetwork._40.diagram.edit.helpers.PMMLBaseEditHelper.EDIT_POLICY_COMMAND,
              command);
    }
    IElementType requestContextElementType = getContextElementType(request);
    request
        .setParameter(
            eu.admire.visual.pmml.neuralnetwork._40.diagram.edit.helpers.PMMLBaseEditHelper.CONTEXT_ELEMENT_TYPE,
            requestContextElementType);
    ICommand command = requestContextElementType.getEditCommand(request);
    request
        .setParameter(
            eu.admire.visual.pmml.neuralnetwork._40.diagram.edit.helpers.PMMLBaseEditHelper.EDIT_POLICY_COMMAND,
            null);
    request
        .setParameter(
            eu.admire.visual.pmml.neuralnetwork._40.diagram.edit.helpers.PMMLBaseEditHelper.CONTEXT_ELEMENT_TYPE,
            null);
    if (command != null) {
      if (!(command instanceof CompositeTransactionalCommand)) {
        command = new CompositeTransactionalCommand(getEditingDomain(),
            command.getLabel()).compose(command);
      }
      return new ICommandProxy(command);
    }
    return editPolicyCommand;
  }
View Full Code Here

    configureRequest.addParameters(getRequest().getParameters());
    configureRequest.setParameter(CreateRelationshipRequest.SOURCE,
        getSource());
    configureRequest.setParameter(CreateRelationshipRequest.TARGET,
        getTarget());
    ICommand configureCommand = elementType
        .getEditCommand(configureRequest);
    if (configureCommand != null && configureCommand.canExecute()) {
      configureCommand.execute(monitor, info);
    }
  }
View Full Code Here

    ConfigureRequest configureRequest = new ConfigureRequest(
        getEditingDomain(), newElement, elementType);
    configureRequest.setClientContext(((CreateElementRequest) getRequest())
        .getClientContext());
    configureRequest.addParameters(getRequest().getParameters());
    ICommand configureCommand = elementType
        .getEditCommand(configureRequest);
    if (configureCommand != null && configureCommand.canExecute()) {
      configureCommand.execute(monitor, info);
    }
  }
View Full Code Here

    ConfigureRequest configureRequest = new ConfigureRequest(
        getEditingDomain(), newElement, elementType);
    configureRequest.setClientContext(((CreateElementRequest) getRequest())
        .getClientContext());
    configureRequest.addParameters(getRequest().getParameters());
    ICommand configureCommand = elementType
        .getEditCommand(configureRequest);
    if (configureCommand != null && configureCommand.canExecute()) {
      configureCommand.execute(monitor, info);
    }
  }
View Full Code Here

    configureRequest.addParameters(getRequest().getParameters());
    configureRequest.setParameter(CreateRelationshipRequest.SOURCE,
        getSource());
    configureRequest.setParameter(CreateRelationshipRequest.TARGET,
        getTarget());
    ICommand configureCommand = elementType
        .getEditCommand(configureRequest);
    if (configureCommand != null && configureCommand.canExecute()) {
      configureCommand.execute(monitor, info);
    }
  }
View Full Code Here

    ConfigureRequest configureRequest = new ConfigureRequest(
        getEditingDomain(), newElement, elementType);
    configureRequest.setClientContext(((CreateElementRequest) getRequest())
        .getClientContext());
    configureRequest.addParameters(getRequest().getParameters());
    ICommand configureCommand = elementType
        .getEditCommand(configureRequest);
    if (configureCommand != null && configureCommand.canExecute()) {
      configureCommand.execute(monitor, info);
    }
  }
View Full Code Here

    ConfigureRequest configureRequest = new ConfigureRequest(
        getEditingDomain(), newElement, elementType);
    configureRequest.setClientContext(((CreateElementRequest) getRequest())
        .getClientContext());
    configureRequest.addParameters(getRequest().getParameters());
    ICommand configureCommand = elementType
        .getEditCommand(configureRequest);
    if (configureCommand != null && configureCommand.canExecute()) {
      configureCommand.execute(monitor, info);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.gmf.runtime.common.core.command.ICommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.