Package eu.admire.dispel.instantiations

Examples of eu.admire.dispel.instantiations.ConnectionInitialization


   * @return The ConnectionStatement if found, null otherwise
   */
  public static ConnectionInitialization getParentConnectionInitialization(
      EObject base) {
   
    ConnectionInitialization ret = null;
    if (base != null) {
      EObject e = base;
      do {
        e = e.eContainer();
        if (e instanceof ConnectionInitialization) {
View Full Code Here


          }
        }

      }

      ConnectionInitialization src = InstantiationsFactory.eINSTANCE
          .createConnectionInitialization();

      IdentifierReference ir = ReferencesFactory.eINSTANCE
          .createIdentifierReference();
      ir.setTarget((LocalVariable) getSource());

      src.setInitialValue(ir);

      newElement.setChild(src);
      newElement.setValue(dst1);

    }
View Full Code Here

    //     ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getContainer().eResource();
    // if (resource == null) {
    //   return null;
    // }
    Resource resource = getElementToEdit().eResource();
    ConnectionInitialization newElement = InstantiationsFactory.eINSTANCE
        .createConnectionInitialization();

    resource.getContents().add(newElement);

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

    //Find Literal
    Shape literalShape = null;
    for (Shape s : d.getChildren()) {
      linked = ls.getBusinessObjectForLinkedPictogramElement(s);
      if (linked instanceof ConnectionInitialization) {
        ConnectionInitialization ci = (ConnectionInitialization) linked;
        EObject e = Utility.getChildLiteral(ci);
        if (Utility.getLiteralValue(
            Utility.getChildLiteral(ci)).equals(name)) {
          literalShape = s;
          modelObject = e;
View Full Code Here

      }
      if (DispelVisualIDRegistry.getNodeVisualID(view, childElement) == ConnectionInitializationEditPart.VISUAL_ID) {

        if (childElement instanceof ConnectionInitialization) {

          ConnectionInitialization ci = (ConnectionInitialization) childElement;

          if (!(ci.getConnectionElement() instanceof IdentifierReference)) {

            result.add(new DispelNodeDescriptor(childElement,
                ConnectionInitializationEditPart.VISUAL_ID));
          }
        }
View Full Code Here

    //TODO iFO       

    if (containerView.getElement() instanceof ConnectionInitialization) {

      ConnectionInitialization modelElement = (ConnectionInitialization) containerView
          .getElement();

      LinkedList<DispelNodeDescriptor> result = new LinkedList<DispelNodeDescriptor>();

      EObject leaf = modelElement.getConnectionElement();

      if (leaf instanceof IdentifierReference) {
        return Collections.emptyList();
      }
View Full Code Here

  /**
   * @generated
   */
  public static List<DispelLinkDescriptor> getConnectionInitialization_2002IncomingLinks(
      View view) {
    ConnectionInitialization modelElement = (ConnectionInitialization) view
        .getElement();
    Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer
        .find(view.eResource().getResourceSet().getResources());
    LinkedList<DispelLinkDescriptor> result = new LinkedList<DispelLinkDescriptor>();
    result.addAll(getIncomingTypeModelFacetLinks_ConnectionExpression_4001(
View Full Code Here

  /**
   * @generated
   */
  public static List<DispelLinkDescriptor> getConnectionInitialization_2002OutgoingLinks(
      View view) {
    ConnectionInitialization modelElement = (ConnectionInitialization) view
        .getElement();
    LinkedList<DispelLinkDescriptor> result = new LinkedList<DispelLinkDescriptor>();
    result.addAll(getOutgoingTypeModelFacetLinks_ConnectionExpression_4001(modelElement));
    return result;
  }
View Full Code Here

    if (src instanceof ConnectionInitialization
        && dst instanceof IdentifierReference) {

      IdentifierReference dst_i = (IdentifierReference) dst;
      ConnectionInitialization src_i = (ConnectionInitialization) src;

      /* |- X -| => PE2.in */

      if (src_i.getConnectionElement() instanceof IdentifierReference
          && dst_i.getNext() != null
          && dst_i.getNext() instanceof IdentifierReference) {

        IdentifierReference ir = (IdentifierReference) src_i
            .getConnectionElement();
        IdentifierReference dst_n = (IdentifierReference) dst_i
            .getNext();

        if (dst_n.getTarget() instanceof ProcessingElementParameter
            && ir.getTarget() instanceof LocalVariable) {

          result.add(new DispelLinkDescriptor(((LocalVariable) ir
              .getTarget()), ((ProcessingElementParameter) dst_n
              .getTarget()), link,
              DispelElementTypes.ConnectionExpression_4001,
              ConnectionExpressionEditPart.VISUAL_ID));

        }
      }

      /* |- 100 -| => PE2.in */

      if (src_i.getConnectionElement() instanceof Literal
          && dst_i.getNext() != null
          && dst_i.getNext() instanceof IdentifierReference) {

        IdentifierReference dst_n = (IdentifierReference) dst_i
            .getNext();

        if (dst_n.getTarget() instanceof ProcessingElementParameter) {

          result.add(new DispelLinkDescriptor(src,
              ((ProcessingElementParameter) dst_n.getTarget()),
              link, DispelElementTypes.ConnectionExpression_4001,
              ConnectionExpressionEditPart.VISUAL_ID));

        }
      }

      /* |- "A" -| => PE2.in */

      if (src_i.getConnectionElement() instanceof StringReference
          && dst_i.getNext() != null
          && dst_i.getNext() instanceof IdentifierReference) {

        IdentifierReference dst_n = (IdentifierReference) dst_i
            .getNext();

        if (dst_n.getTarget() instanceof ProcessingElementParameter) {

          result.add(new DispelLinkDescriptor(src,
              ((ProcessingElementParameter) dst_n.getTarget()),
              link, DispelElementTypes.ConnectionExpression_4001,
              ConnectionExpressionEditPart.VISUAL_ID));

        }
      }

      /* |- ["A","B"] -| => PE2.in */

      if (src_i.getConnectionElement() instanceof ArrayInitializationByElements
          && dst_i.getNext() != null
          && dst_i.getNext() instanceof IdentifierReference) {

        IdentifierReference dst_n = (IdentifierReference) dst_i
            .getNext();
View Full Code Here

    //     ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getContainer().eResource();
    // if (resource == null) {
    //   return null;
    // }
    Resource resource = getElementToEdit().eResource();
    ConnectionInitialization newElement = InstantiationsFactory.eINSTANCE
        .createConnectionInitialization();

    resource.getContents().add(newElement);

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

TOP

Related Classes of eu.admire.dispel.instantiations.ConnectionInitialization

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.