Package net.sf.parteg.base.testcasetree.generated

Examples of net.sf.parteg.base.testcasetree.generated.TCGEvent


   * @param in_oSMEvent
   * @return
   */
  public static TCGEvent createTCGEvent(Event in_oSMEvent, boolean in_bCreateTCGEventIfEventIsNull)
  {
    TCGEvent oTCGEvent = GeneratedFactory.eINSTANCE.createTCGEvent();
    if(in_oSMEvent != null){
      oTCGEvent.setName(in_oSMEvent.getName());
      oTCGEvent.setEvent(in_oSMEvent);
      oTCGEvent.setDefaultEvent(false);
    }
    else if(in_bCreateTCGEventIfEventIsNull)
    {
      oTCGEvent.setName(Configuration.getDefaultTransitionName());
      oTCGEvent.setEvent(null);
      oTCGEvent.setDefaultEvent(true);
    }
    else
      oTCGEvent = null;
    return oTCGEvent;
  }
View Full Code Here


        {
          bReachingTransitionBearsConflicts = true;
        }
        else
        {
          TCGEvent oTCGEvent = createTCGEvent(in_oEvent, in_bCreateTCGEventIfEventIsNull);           
          TCGTransition oTransition = createTCGPart(in_oTCGNode,
              (oTCGEvent != null ? oTCGEvent.getName() : Configuration.getDefaultTransitionName()));
          // remember original expression
          oTransition.getTargetNode().setOriginalExpression(in_oExpression);
         
          if(oTransition != null)
          {
            boolean bResult = true;
            // adapt all parameters of all expressions of the conjunction
            for(TCGOCLExpression oExpression : oConjunction.getExpressions())
            {
              adaptTCGOCLExpression(oExpression, oTransition, oTCGEvent, in_oContextClass);
              if(oTransition.getPrecondition().getConjunctions().isEmpty())
                oTransition.getPrecondition().getConjunctions().add(
                    GeneratedFactory.eINSTANCE.createTCGConjunction());
              oTransition.getPrecondition().getConjunctions().get(0).getExpressions().add(oExpression);
              bResult = bResult && adaptDomainForNonPostcondition(oExpression, oTransition.getTargetNode(), oTransition.getTargetNode());
            }
   
            if(bResult == false)
            {
              removeTransition(oTransition);
              bReachingTransitionBearsConflicts = true;
            }
            else
            {
              // mark node as its purpose is just to negate an expression 
              if(!oConjunction.isPositiveSubExpressionOfOriginal())
                oTransition.getTargetNode().setCorrespondsNegativeExpression(true);
              colNodes.add(oTransition.getTargetNode());
            }
          }
        }
      }
    }
   
    // expression results in no new nodes and no conflicts found? -> add default node
    if(colNodes.isEmpty() && !bReachingTransitionBearsConflicts)
    {
      TCGEvent oTCGEvent = createTCGEvent(in_oEvent, true);           
      TCGTransition oTransition = createTCGPart(in_oTCGNode, oTCGEvent.getName());
      if(oTransition != null)
      {
        addEvent(null, oTransition, oTCGEvent, in_oContextClass);
        colNodes.add(oTransition.getTargetNode());
      }
View Full Code Here

      if(oTransition != null)
      {
        // remember original expression
        oTransition.getTargetNode().setOriginalExpression(in_oExpression);
       
        TCGEvent oTCGEvent = findTriggeringEvent(oTransition);
        boolean bResult = true;
       
        for(TCGOCLExpression oExpression : oConjunction.getExpressions())
        {
          adaptTCGOCLExpression(oExpression, oTransition, null, in_oContextClass);
View Full Code Here

        T result = caseTCGEquivalenceClass(tcgEquivalenceClass);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case GeneratedPackage.TCG_EVENT: {
        TCGEvent tcgEvent = (TCGEvent)theEObject;
        T result = caseTCGEvent(tcgEvent);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case GeneratedPackage.TCGOCL_EXPRESSION: {
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetEvent(TCGEvent newEvent, NotificationChain msgs) {
    TCGEvent oldEvent = event;
    event = newEvent;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GeneratedPackage.TCG_TRANSITION__EVENT, oldEvent, newEvent);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

   
    // check for events
    for(TCGTransition oTransition : in_oTCTNode.getOutgoingTransitions())
    {
      EventNode oNode = in_oNode;
      TCGEvent oEvent = oTransition.getEvent();
      if(oEvent != null)
      {
        if(!oEvent.isDefaultEvent()){
          EventArc oArc = new EventArc(oEvent);
          in_oNode.getOutgoingArcs().add(oArc);
          oNode = new EventNode();
          oArc.setTargetNode(oNode);
        }
View Full Code Here

TOP

Related Classes of net.sf.parteg.base.testcasetree.generated.TCGEvent

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.