Package fd2.diagram.edit.policies

Examples of fd2.diagram.edit.policies.ExcludesRelationItemSemanticEditPolicy


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


   */
  public static List getDiagram_1000SemanticChildren(View view) {
    if (!view.isSetElement()) {
      return Collections.EMPTY_LIST;
    }
    Diagram modelElement = (Diagram) view.getElement();
    List result = new LinkedList();
    for (Iterator it = modelElement.getDiagramElements().iterator(); it
        .hasNext();) {
      DiagramElement childElement = (DiagramElement) it.next();
      int visualID = Fd2VisualIDRegistry.getNodeVisualID(view,
          childElement);
      if (visualID == FeatureNodeEditPart.VISUAL_ID) {
View Full Code Here

  /**
   * @generated
   */
  public static List getDiagram_1000ContainedLinks(View view) {
    Diagram modelElement = (Diagram) view.getElement();
    List result = new LinkedList();
    result
        .addAll(getContainedTypeModelFacetLinks_ExcludesRelation_4010(modelElement));
    return result;
  }
View Full Code Here

  /**
   * @generated
   */
  private static Collection getOutgoingTypeModelFacetLinks_ExcludesRelation_4010(
      BaseFeatureNode source) {
    Diagram container = null;
    // Find container element for the link.
    // Climb up by containment hierarchy starting from the source
    // and return the first element that is instance of the container class.
    for (EObject element = source; element != null && container == null; element = element
        .eContainer()) {
      if (element instanceof Diagram) {
        container = (Diagram) element;
      }
    }
    if (container == null) {
      return Collections.EMPTY_LIST;
    }
    Collection result = new LinkedList();
    for (Iterator links = container.getDiagramElements().iterator(); links
        .hasNext();) {
      EObject linkObject = (EObject) links.next();
      if (false == linkObject instanceof ExcludesRelation) {
        continue;
      }
View Full Code Here

    }
    Diagram modelElement = (Diagram) view.getElement();
    List result = new LinkedList();
    for (Iterator it = modelElement.getDiagramElements().iterator(); it
        .hasNext();) {
      DiagramElement childElement = (DiagramElement) it.next();
      int visualID = Fd2VisualIDRegistry.getNodeVisualID(view,
          childElement);
      if (visualID == FeatureNodeEditPart.VISUAL_ID) {
        result.add(new Fd2NodeDescriptor(childElement, visualID));
        continue;
View Full Code Here

                }
              }

            }
          } else if (DGelem instanceof ExcludesRelation) {
            ExcludesRelation excludeRelation = (ExcludesRelation) DGelem;
            if (excludeRelation.getSourceFeature().getName()
                .contentEquals(AE.getFeatureElement())) {
             
              String excludesElementName = excludeRelation.getTargetFeature().getName();
              AE.addExcludesRelation(excludesElementName);
             
              for (AssociatedElement parentSearchAE : DG
                  .getDiagramAssociations()
                  .getElements()) {
View Full Code Here

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

    ExcludesRelation newElement = Fd2Factory.eINSTANCE
        .createExcludesRelation();
    getContainer().getDiagramElements().add(newElement);
    newElement.setSourceFeature(getSource());
    newElement.setTargetFeature(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 ExcludesRelation) {
        continue;
      }
      ExcludesRelation link = (ExcludesRelation) linkObject;
      if (ExcludesRelationEditPart.VISUAL_ID != Fd2VisualIDRegistry
          .getLinkWithClassVisualID(link)) {
        continue;
      }
      BaseFeatureNode dst = link.getTargetFeature();
      BaseFeatureNode src = link.getSourceFeature();
      result.add(new Fd2LinkDescriptor(src, dst, link,
          Fd2ElementTypes.ExcludesRelation_4010,
          ExcludesRelationEditPart.VISUAL_ID));
    }
    return result;
View Full Code Here

      if (setting.getEStructuralFeature() != Fd2Package.eINSTANCE
          .getExcludesRelation_TargetFeature()
          || false == setting.getEObject() instanceof ExcludesRelation) {
        continue;
      }
      ExcludesRelation link = (ExcludesRelation) setting.getEObject();
      if (ExcludesRelationEditPart.VISUAL_ID != Fd2VisualIDRegistry
          .getLinkWithClassVisualID(link)) {
        continue;
      }
      BaseFeatureNode src = link.getSourceFeature();
      result.add(new Fd2LinkDescriptor(src, target, link,
          Fd2ElementTypes.ExcludesRelation_4010,
          ExcludesRelationEditPart.VISUAL_ID));
    }
    return result;
View Full Code Here

        .hasNext();) {
      EObject linkObject = (EObject) links.next();
      if (false == linkObject instanceof ExcludesRelation) {
        continue;
      }
      ExcludesRelation link = (ExcludesRelation) linkObject;
      if (ExcludesRelationEditPart.VISUAL_ID != Fd2VisualIDRegistry
          .getLinkWithClassVisualID(link)) {
        continue;
      }
      BaseFeatureNode dst = link.getTargetFeature();
      BaseFeatureNode src = link.getSourceFeature();
      if (src != source) {
        continue;
      }
      result.add(new Fd2LinkDescriptor(src, dst, link,
          Fd2ElementTypes.ExcludesRelation_4010,
View Full Code Here

TOP

Related Classes of fd2.diagram.edit.policies.ExcludesRelationItemSemanticEditPolicy

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.