Package eu.admire.dispel.statements

Examples of eu.admire.dispel.statements.ConnectionStatement


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


  /**
   * @generated
   */
  private static Collection<DispelLinkDescriptor> getOutgoingTypeModelFacetLinks_ConnectionExpression_4001(
      ConnectionEnabledElement source) {
    ConnectionStatement 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 ConnectionStatement) {
        container = (ConnectionStatement) element;
      }
    }
    if (container == null) {
      return Collections.emptyList();
    }
    LinkedList<DispelLinkDescriptor> result = new LinkedList<DispelLinkDescriptor>();
    ConnectionExpression link = container.getExpression();
    if (ConnectionExpressionEditPart.VISUAL_ID != DispelVisualIDRegistry
        .getLinkWithClassVisualID(link)) {
      return result;
    }
    ConnectionEnabledElement dst = link.getValue();
View Full Code Here

      }
    }
   
    Anchor tAnchor = context.getTargetAnchor();
   
    ConnectionStatement cs = createAndAddConnectionStatement(
        sAnchor, tAnchor);

    // add connection for business object
    AddConnectionContext addContext =
        new AddConnectionContext(sAnchor, tAnchor);
View Full Code Here

    //Either have a CI as source or output port on PE
    ConnectionInitialization sourceCI = getConnectionInitialization(
        sAnchor);
    Output sourceOut = getOutput(sAnchor);
   
    ConnectionStatement cs = null;
   
    Input target = getInput(tAnchor);
    LocalVariableStatement lvs = getLocalVariableStatementForAnchor(tAnchor);

    if ((sourceCI != null || sourceOut != null)
View Full Code Here

      Output sourceOutput,
      LocalVariable sourceVariable,
      Input targetInput,
      LocalVariable targetVariable) {

    ConnectionStatement cs =
        StatementsFactory.eINSTANCE.createConnectionStatement();
    ConnectionExpression ce =
        ExpressionsFactory.eINSTANCE.createConnectionExpression();
   
    IdentifierReference outVarRef =
        ReferencesFactory.eINSTANCE.createIdentifierReference();
    IdentifierReference outRef =
        ReferencesFactory.eINSTANCE.createIdentifierReference();
    outVarRef.setTarget(sourceVariable);
    outRef.setTarget(sourceOutput);
    outVarRef.setNext(outRef);
   
    cs.setExpression(ce);
    ce.setChild(outVarRef);
    ce.setConnectionOperator(OperatorsFactory.eINSTANCE.createConnector());
   
    IdentifierReference variableRef =
        ReferencesFactory.eINSTANCE.createIdentifierReference();
View Full Code Here

  private ConnectionStatement createAndAddConnectionStatement(
      LocalVariableStatement source,
      Input targetInput,
      LocalVariable targetVariable) {

    ConnectionStatement cs =
        StatementsFactory.eINSTANCE.createConnectionStatement();
    ConnectionExpression ce =
        ExpressionsFactory.eINSTANCE.createConnectionExpression();
   
    IdentifierReference sourceVar =
        ReferencesFactory.eINSTANCE.createIdentifierReference();
    sourceVar.setTarget(source.getVariable());
    cs.setExpression(ce);
    ce.setChild(sourceVar);
    ce.setConnectionOperator(OperatorsFactory.eINSTANCE.createConnector());
   
    IdentifierReference variableRef =
        ReferencesFactory.eINSTANCE.createIdentifierReference();
View Full Code Here

   * @param ci
   */
  public static void removeCIHolder(ConnectionInitialization ci) {
    EObject exps = getParentExpressionStatement(ci);
    if (exps != null) {
      ConnectionStatement conns = getParentConnectionStatement(ci);
      if (conns != null) {
        EcoreUtil.remove(conns);
      }
    }
   
View Full Code Here

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

    }
    ConnectionEnabledElement target = getLink().getValue();
    if (!(getLink().eContainer() instanceof ConnectionStatement)) {
      return false;
    }
    ConnectionStatement container = (ConnectionStatement) getLink()
        .eContainer();
    return DispelBaseItemSemanticEditPolicy.getLinkConstraints()
        .canExistConnectionExpression_4001(container, getLink(),
            getNewSource(), target);
  }
View Full Code Here

    }
    ConnectionEnabledElement source = getLink().getChild();
    if (!(getLink().eContainer() instanceof ConnectionStatement)) {
      return false;
    }
    ConnectionStatement container = (ConnectionStatement) getLink()
        .eContainer();
    return DispelBaseItemSemanticEditPolicy.getLinkConstraints()
        .canExistConnectionExpression_4001(container, getLink(),
            source, getNewTarget());
  }
View Full Code Here

TOP

Related Classes of eu.admire.dispel.statements.ConnectionStatement

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.