Package org.eclipse.gef.commands

Examples of org.eclipse.gef.commands.Command


    }

    boolean changed = deleteViews(orphaned.iterator());
    //
    CreateViewRequest request = getCreateViewRequest(viewDescriptors);
    Command cmd = getCreateViewCommand(request);
    if (cmd != null && cmd.canExecute()) {
      SetViewMutabilityCommand.makeMutable(
          new EObjectAdapter(host().getNotationView())).execute();
      executeCommand(cmd);
      @SuppressWarnings("unchecked")
      List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
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

    }

    boolean changed = deleteViews(orphaned.iterator());
    //
    CreateViewRequest request = getCreateViewRequest(viewDescriptors);
    Command cmd = getCreateViewCommand(request);
    if (cmd != null && cmd.canExecute()) {
      SetViewMutabilityCommand.makeMutable(
          new EObjectAdapter(host().getNotationView())).execute();
      executeCommand(cmd);
      if (boundsCommand.canExecute()) {
        executeCommand(new ICommandProxy(boundsCommand.reduce()));
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

    }

    boolean changed = deleteViews(orphaned.iterator());
    //
    CreateViewRequest request = getCreateViewRequest(viewDescriptors);
    Command cmd = getCreateViewCommand(request);
    if (cmd != null && cmd.canExecute()) {
      SetViewMutabilityCommand.makeMutable(
          new EObjectAdapter(host().getNotationView())).execute();
      executeCommand(cmd);
      @SuppressWarnings("unchecked")
      List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
View Full Code Here

    }

    boolean changed = deleteViews(orphaned.iterator());
    //
    CreateViewRequest request = getCreateViewRequest(viewDescriptors);
    Command cmd = getCreateViewCommand(request);
    if (cmd != null && cmd.canExecute()) {
      SetViewMutabilityCommand.makeMutable(
          new EObjectAdapter(host().getNotationView())).execute();
      executeCommand(cmd);
      @SuppressWarnings("unchecked")
      List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
View Full Code Here

    }

    boolean changed = deleteViews(orphaned.iterator());
    //
    CreateViewRequest request = getCreateViewRequest(viewDescriptors);
    Command cmd = getCreateViewCommand(request);
    if (cmd != null && cmd.canExecute()) {
      SetViewMutabilityCommand.makeMutable(
          new EObjectAdapter(host().getNotationView())).execute();
      executeCommand(cmd);
      @SuppressWarnings("unchecked")
      List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
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 getSemanticCommand(IEditCommandRequest request) {
    IEditCommandRequest completedRequest = completeRequest(request);
    Command semanticCommand = getSemanticCommandSwitch(completedRequest);
    semanticCommand = getEditHelperCommand(completedRequest,
        semanticCommand);
    if (completedRequest instanceof DestroyRequest) {
      DestroyRequest destroyRequest = (DestroyRequest) completedRequest;
      return shouldProceed(destroyRequest) ? addDeleteViewCommand(
View Full Code Here

  /**
   * @generated
   */
  protected Command addDeleteViewCommand(Command mainCommand,
      DestroyRequest completedRequest) {
    Command deleteViewCommand = getGEFWrapper(new DeleteCommand(
        getEditingDomain(), (View) getHost().getModel()));
    return mainCommand == null ? deleteViewCommand : mainCommand
        .chain(deleteViewCommand);
  }
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.