Package fd2.diagram.edit.commands

Examples of fd2.diagram.edit.commands.OneManyRelationTargetFeatureNodesReorientCommand


    }
    FeatureNode modelElement = (FeatureNode) containerView.getElement();
    List result = new LinkedList();
    for (Iterator it = modelElement.getChildRelations().iterator(); it
        .hasNext();) {
      AbstractRelation childElement = (AbstractRelation) it.next();
      int visualID = Fd2VisualIDRegistry.getNodeVisualID(view,
          childElement);
      if (visualID == ExclusiveCaseRelationEditPart.VISUAL_ID) {
        result.add(new Fd2NodeDescriptor(childElement, visualID));
        continue;
View Full Code Here


   */
  protected boolean canReorientSource() {
    if (!(oldEnd instanceof BaseFeatureNode && newEnd instanceof BaseFeatureNode)) {
      return false;
    }
    BaseFeatureNode target = getLink().getTargetFeatureNode();
    return Fd2BaseItemSemanticEditPolicy.LinkConstraints
        .canExistMandatoryRelation_4008(getNewSource(), target);
  }
View Full Code Here

      return false;
    }
    if (!(getLink().eContainer() instanceof BaseFeatureNode)) {
      return false;
    }
    BaseFeatureNode source = (BaseFeatureNode) getLink().eContainer();
    return Fd2BaseItemSemanticEditPolicy.LinkConstraints
        .canExistMandatoryRelation_4008(source, getNewTarget());
  }
View Full Code Here

   */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    CaseOrRelation newElement = Fd2Factory.eINSTANCE.createCaseOrRelation();

    BaseFeatureNode owner = (BaseFeatureNode) getElementToEdit();
    owner.getChildRelations().add(newElement);

    Fd2ElementTypes.init_CaseOrRelation_3002(newElement);

    doConfigure(newElement, monitor, info);

View Full Code Here

   */
  protected boolean canReorientSource() {
    if (!(oldEnd instanceof BaseFeatureNode && newEnd instanceof BaseFeatureNode)) {
      return false;
    }
    BaseFeatureNode target = getLink().getTargetFeatureNode();
    return Fd2BaseItemSemanticEditPolicy.LinkConstraints
        .canExistOptionalRelation_4009(getNewSource(), target);
  }
View Full Code Here

      return false;
    }
    if (!(getLink().eContainer() instanceof BaseFeatureNode)) {
      return false;
    }
    BaseFeatureNode source = (BaseFeatureNode) getLink().eContainer();
    return Fd2BaseItemSemanticEditPolicy.LinkConstraints
        .canExistOptionalRelation_4009(source, getNewTarget());
  }
View Full Code Here

    setFixture(null);
  }

    public void testCreateRealtionToFeatureNode() {
       
      BaseFeatureNode newTargetFeatureNode =  Fd2Factory.eINSTANCE.createFeatureNode();
     
      this.getFixture().setTargetFeatureNode(newTargetFeatureNode);
     
      BaseFeatureNode getTargetFeatureNode = this.getFixture().getTargetFeatureNode();
     
      assertEquals(newTargetFeatureNode, getTargetFeatureNode);
     
   }
View Full Code Here

  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    ExclusiveCaseRelation newElement = Fd2Factory.eINSTANCE
        .createExclusiveCaseRelation();

    BaseFeatureNode owner = (BaseFeatureNode) getElementToEdit();
    owner.getChildRelations().add(newElement);

    Fd2ElementTypes.init_ExclusiveCaseRelation_3003(newElement);

    doConfigure(newElement, monitor, info);
View Full Code Here

   */
  protected boolean canReorientSource() {
    if (!(oldEnd instanceof BaseFeatureNode && newEnd instanceof BaseFeatureNode)) {
      return false;
    }
    BaseFeatureNode target = getLink().getTargetFeatureNode();
    return Fd2BaseItemSemanticEditPolicy.LinkConstraints
        .canExistRequireRelation_4006(getNewSource(), target);
  }
View Full Code Here

      return false;
    }
    if (!(getLink().eContainer() instanceof BaseFeatureNode)) {
      return false;
    }
    BaseFeatureNode source = (BaseFeatureNode) getLink().eContainer();
    return Fd2BaseItemSemanticEditPolicy.LinkConstraints
        .canExistRequireRelation_4006(source, getNewTarget());
  }
View Full Code Here

TOP

Related Classes of fd2.diagram.edit.commands.OneManyRelationTargetFeatureNodesReorientCommand

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.