Package eu.admire.dispel.instantiations

Examples of eu.admire.dispel.instantiations.ConnectionInitialization


    //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("\"Connection\"")) {
          literalShape = s;
          break;
View Full Code Here


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

        if (childElement instanceof ConnectionInitialization) {

          ConnectionInitialization ci = (ConnectionInitialization) childElement;

          if (ci.getContainingMethod() == null) {
            continue;
          }

          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

 
  public ConnectionStatement createAndAddConnectionStatement(Anchor sAnchor,
      Anchor tAnchor) {
   
    //Either have a CI as source or output port on PE
    ConnectionInitialization sourceCI = getConnectionInitialization(
        sAnchor);
    Output sourceOut = getOutput(sAnchor);
   
    ConnectionStatement cs = null;
   
View Full Code Here

     * @return Pair of ExpressionStatement and ConnectionInitialization.
     */
    public static Pair<ExpressionStatement, ConnectionInitialization>
    createAndWrapCI(
        UnaryModificationExpressionChild literal) {
      ConnectionInitialization ci = InstantiationsFactory.eINSTANCE
            .createConnectionInitialization();
        Pair <AssignmentExpression, SuffixUnaryModificationExpression> p =
            Utility.createAssToSuffUModExpressionChain();
        ci.setInitialValue(p.getLeft());
        p.getRight().setChild(literal);

        //Wrap the ci in a temporary expression statement so we can add it
        //to the package
        ExpressionStatement exp = wrapCI(ci);         
View Full Code Here

     */
    public static LocalVariableStatement wrapLiteral(
        UnaryModificationExpressionChild literal,
        Resource r) {
     
          ConnectionInitialization ci = InstantiationsFactory.eINSTANCE
                .createConnectionInitialization();
            Pair <AssignmentExpression, SuffixUnaryModificationExpression> p =
                Utility.createAssToSuffUModExpressionChain();
            ci.setInitialValue(p.getLeft());
            p.getRight().setChild(literal);

            //Wrap the ci in a temporary expression statement so we can add it
            //to the package
            return wrapCIinLVS(ci, r);         
View Full Code Here

   * @param exp The expression to navigate
   * @return The ConnectionInitialization if found, null otherwise
   */
  public static ConnectionInitialization getChildCIStatement(
      EObject parent) {
    ConnectionInitialization ret = null;
    if (parent != null) {
      EObject e = parent;
      while (e.eContents().size() >0) {
        e = e.eContents().get(0);
        if (e instanceof ConnectionInitialization) {
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.