Package fd2

Examples of fd2.FeatureNode


  /**
   * @generated
   */
  public static List getFeatureNode_2001IncomingLinks(View view) {
    FeatureNode modelElement = (FeatureNode) view.getElement();
    Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource()
        .getResourceSet().getResources());
    List result = new LinkedList();
    result.addAll(getIncomingTypeModelFacetLinks_MandatoryRelation_4008(
        modelElement, crossReferences));
View Full Code Here


  /**
   * @generated
   */
  public static List getFeatureNode_2001OutgoingLinks(View view) {
    FeatureNode modelElement = (FeatureNode) view.getElement();
    List result = new LinkedList();
    result
        .addAll(getContainedTypeModelFacetLinks_MandatoryRelation_4008(modelElement));
    result
        .addAll(getContainedTypeModelFacetLinks_OptionalRelation_4009(modelElement));
View Full Code Here

        if (DGelem instanceof FeatureNode) {

          complexity.setF(complexity.getF() + 1);
          complexity.setSubtrees(complexity.getSubtrees() + 1);

          FeatureNode baseNode = (FeatureNode) DGelem;
          int minCgCount = 0;
          for (AbstractRelation abstractRel : baseNode
              .getChildRelations()) {

            if (abstractRel instanceof MandatoryRelation) {
              complexity.setRand(complexity.getRand() + 1);

              FDTree iEl = new FDTree();
              iEl.setParent(baseNode.getName());
              iEl.setElement(((MandatoryRelation) abstractRel)
                  .getTargetFeatureNode().getName());
              tChilds.add(iEl);

            }
            if (abstractRel instanceof OptionalRelation) {
              complexity.setRor(complexity.getRor() + 1);

              FDTree iEl = new FDTree();
              iEl.setParent(baseNode.getName());
              iEl.setElement(((OptionalRelation) abstractRel)
                  .getTargetFeatureNode().getName());
              tChilds.add(iEl);
             
              if(minCgCount < 1)
                complexity.setMinCg(complexity.getMinCg() + 1);
             
              minCgCount++;
            }
            if (abstractRel instanceof ExclusiveCaseRelation) {
              for (BaseFeatureNode baseFN : ((ExclusiveCaseRelation) abstractRel)
                  .getTargetFeatureNodes()) {
                complexity.setRCase(complexity.getRCase() + 1);

                complexity
                    .setSubtrees(complexity.getSubtrees() - 1);

                FDTree iEl = new FDTree();
                iEl.setParent(baseNode.getName());
                iEl.setElement(baseFN.getName());
                tChilds.add(iEl);
              }
              complexity.setMinCg(complexity.getMinCg() + 1);
              complexity
                  .setSubtrees(complexity.getSubtrees() + 1);
            }
            if (abstractRel instanceof CaseOrRelation) {
              for (BaseFeatureNode baseFN : ((CaseOrRelation) abstractRel)
                  .getTargetFeatureNodes()) {
                complexity.setRopt(complexity.getRopt() + 1);

                FDTree iEl = new FDTree();
                iEl.setParent(baseNode.getName());
                iEl.setElement(baseFN.getName());
                tChilds.add(iEl);
               
              }
              complexity.setMinCg(complexity.getMinCg() + 1);
View Full Code Here

    if (!canExecute()) {
      throw new ExecutionException(
          "Invalid arguments in create link command"); //$NON-NLS-1$
    }

    MandatoryRelation newElement = Fd2Factory.eINSTANCE
        .createMandatoryRelation();
    getSource().getChildRelations().add(newElement);
    newElement.setTargetFeatureNode(getTarget());
    doConfigure(newElement, monitor, info);
    ((CreateElementRequest) getRequest()).setNewElement(newElement);
    return CommandResult.newOKCommandResult(newElement);

  }
View Full Code Here

        .hasNext();) {
      EObject linkObject = (EObject) links.next();
      if (false == linkObject instanceof MandatoryRelation) {
        continue;
      }
      MandatoryRelation link = (MandatoryRelation) linkObject;
      if (MandatoryRelationEditPart.VISUAL_ID != Fd2VisualIDRegistry
          .getLinkWithClassVisualID(link)) {
        continue;
      }
      BaseFeatureNode dst = link.getTargetFeatureNode();
      result.add(new Fd2LinkDescriptor(container, dst, link,
          Fd2ElementTypes.MandatoryRelation_4008,
          MandatoryRelationEditPart.VISUAL_ID));
    }
    return result;
View Full Code Here

      if (setting.getEStructuralFeature() != Fd2Package.eINSTANCE
          .getOneOneRelation_TargetFeatureNode()
          || false == setting.getEObject() instanceof MandatoryRelation) {
        continue;
      }
      MandatoryRelation link = (MandatoryRelation) setting.getEObject();
      if (MandatoryRelationEditPart.VISUAL_ID != Fd2VisualIDRegistry
          .getLinkWithClassVisualID(link)) {
        continue;
      }
      if (false == link.eContainer() instanceof BaseFeatureNode) {
        continue;
      }
      BaseFeatureNode container = (BaseFeatureNode) link.eContainer();
      result.add(new Fd2LinkDescriptor(container, target, link,
          Fd2ElementTypes.MandatoryRelation_4008,
          MandatoryRelationEditPart.VISUAL_ID));

    }
View Full Code Here

   * @generated
   */
  @Override
  public String getText(Object object)
  {
    OneManyRelation oneManyRelation = (OneManyRelation)object;
    return getString("_UI_OneManyRelation_type") + " " + oneManyRelation.getLowerBound();
  }
View Full Code Here

    if (!canExecute()) {
      throw new ExecutionException(
          "Invalid arguments in create link command"); //$NON-NLS-1$
    }

    OptionalRelation newElement = Fd2Factory.eINSTANCE
        .createOptionalRelation();
    getSource().getChildRelations().add(newElement);
    newElement.setTargetFeatureNode(getTarget());
    doConfigure(newElement, monitor, info);
    ((CreateElementRequest) getRequest()).setNewElement(newElement);
    return CommandResult.newOKCommandResult(newElement);

  }
View Full Code Here

        .hasNext();) {
      EObject linkObject = (EObject) links.next();
      if (false == linkObject instanceof OptionalRelation) {
        continue;
      }
      OptionalRelation link = (OptionalRelation) linkObject;
      if (OptionalRelationEditPart.VISUAL_ID != Fd2VisualIDRegistry
          .getLinkWithClassVisualID(link)) {
        continue;
      }
      BaseFeatureNode dst = link.getTargetFeatureNode();
      result.add(new Fd2LinkDescriptor(container, dst, link,
          Fd2ElementTypes.OptionalRelation_4009,
          OptionalRelationEditPart.VISUAL_ID));
    }
    return result;
View Full Code Here

      if (setting.getEStructuralFeature() != Fd2Package.eINSTANCE
          .getOneOneRelation_TargetFeatureNode()
          || false == setting.getEObject() instanceof OptionalRelation) {
        continue;
      }
      OptionalRelation link = (OptionalRelation) setting.getEObject();
      if (OptionalRelationEditPart.VISUAL_ID != Fd2VisualIDRegistry
          .getLinkWithClassVisualID(link)) {
        continue;
      }
      if (false == link.eContainer() instanceof BaseFeatureNode) {
        continue;
      }
      BaseFeatureNode container = (BaseFeatureNode) link.eContainer();
      result.add(new Fd2LinkDescriptor(container, target, link,
          Fd2ElementTypes.OptionalRelation_4009,
          OptionalRelationEditPart.VISUAL_ID));

    }
View Full Code Here

TOP

Related Classes of fd2.FeatureNode

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.