Package org.eclipse.gef.commands

Examples of org.eclipse.gef.commands.Command


  /**
   * @generated
   */
  protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
    Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req)
        : getCompleteCreateRelationshipCommand(req);
    return command != null ? command : super
        .getCreateRelationshipCommand(req);
  }
View Full Code Here


  /**
   * @generated
   */
  protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
    Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req)
        : getCompleteCreateRelationshipCommand(req);
    return command != null ? command : super
        .getCreateRelationshipCommand(req);
  }
View Full Code Here

  /**
   * @generated
   */
  protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
    Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req)
        : getCompleteCreateRelationshipCommand(req);
    return command != null ? command : super
        .getCreateRelationshipCommand(req);
  }
View Full Code Here

      ccr.setType(RequestConstants.REQ_CONNECTION_START);
      ccr.setSourceEditPart(sourceEditPart);
      sourceEditPart.getCommand(ccr);
      ccr.setTargetEditPart(targetEditPart);
      ccr.setType(RequestConstants.REQ_CONNECTION_END);
      Command cmd = targetEditPart.getCommand(ccr);
      if (cmd != null && cmd.canExecute()) {
        executeCommand(cmd);
        IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
        if (viewAdapter != null) {
          adapters.add(viewAdapter);
        }
View Full Code Here

  /**
   * @generated
   */
  protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
    Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req)
        : getCompleteCreateRelationshipCommand(req);
    return command != null ? command : super
        .getCreateRelationshipCommand(req);
  }
View Full Code Here

  /**
   * @generated
   */
  protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
    Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req)
        : getCompleteCreateRelationshipCommand(req);
    return command != null ? command : super
        .getCreateRelationshipCommand(req);
  }
View Full Code Here

        .getElementType(editHelperContext);
    if (elementType == ElementTypeRegistry.getInstance().getType(
        "org.eclipse.gmf.runtime.emf.type.core.default")) { //$NON-NLS-1$
      elementType = null;
    }
    Command semanticCommand = getSemanticCommandSwitch(completedRequest);
    if (elementType != null) {
      if (semanticCommand != null) {
        ICommand command = semanticCommand instanceof ICommandProxy ? ((ICommandProxy) semanticCommand)
            .getICommand()
            : new CommandProxy(semanticCommand);
        completedRequest
            .setParameter(
                OntoUML.diagram.edit.helpers.OntoUMLBaseEditHelper.EDIT_POLICY_COMMAND,
                command);
      }
      ICommand command = elementType.getEditCommand(completedRequest);
      if (command != null) {
        if (!(command instanceof CompositeTransactionalCommand)) {
          TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
              .getEditingDomain();
          command = new CompositeTransactionalCommand(editingDomain,
              command.getLabel()).compose(command);
        }
        semanticCommand = new ICommandProxy(command);
      }
    }
    boolean shouldProceed = true;
    if (completedRequest instanceof DestroyRequest) {
      shouldProceed = shouldProceed((DestroyRequest) completedRequest);
    }
    if (shouldProceed) {
      if (completedRequest instanceof DestroyRequest) {
        TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
            .getEditingDomain();
        Command deleteViewCommand = new ICommandProxy(
            new DeleteCommand(editingDomain, (View) getHost()
                .getModel()));
        semanticCommand = semanticCommand == null ? deleteViewCommand
            : semanticCommand.chain(deleteViewCommand);
      }
View Full Code Here

  /**
   * @generated
   */
  protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
    Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req)
        : getCompleteCreateRelationshipCommand(req);
    return command != null ? command : super
        .getCreateRelationshipCommand(req);
  }
View Full Code Here

  /**
   * @generated
   */
  protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
    Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req)
        : getCompleteCreateRelationshipCommand(req);
    return command != null ? command : super
        .getCreateRelationshipCommand(req);
  }
View Full Code Here

  /**
   * @generated
   */
  protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
    Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req)
        : getCompleteCreateRelationshipCommand(req);
    return command != null ? command : super
        .getCreateRelationshipCommand(req);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.gef.commands.Command

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.