Package net.sf.parteg.base.testcasegraph.generated

Examples of net.sf.parteg.base.testcasegraph.generated.TestCaseRegion


  }
 
  public void executeRuntimeStateChange() {
    // remove all sub- or super regions of the new node's region from the current runtime state
    m_colRemovedNodes = new ArrayList<TCGNode>();
    TestCaseRegion oInRegion = TCGNodeHelperClass.getContainingRegion(m_oNode);
    for(TestCaseRegion oRegion : m_oRunner.getRuntimeState().getAllRegions()) {
      if(TCGRegionHelperClass.regionsAreInHierarchicalOrder(oRegion, oInRegion)) {
        m_colRemovedNodes.add(m_oRunner.getRuntimeState().getActiveNode(oRegion));
      }
    }
View Full Code Here


        List<TCGElement> colElements = oReferencer.getValuesForKey(oObject);
        if(colElements != null) {
          // evaluate all found references
          for(TCGElement oElement : colElements)
          {
            TestCaseRegion oRegion = null;
            TCGRealNode oNode = null;
            TCGTransition oTransition = null;
           
            if(oElement instanceof TCGRealNode)
            {
View Full Code Here

      TestCaseRegion in_oCurrent,
      TestCaseRegion in_oRegion1,
      TestCaseRegion in_oRegion2) {
    TCGRealNode oNode = in_oCurrent.getContainer().getCompositeSuperState();
    if(oNode != null) {
      TestCaseRegion oTmp = oNode.getContainer();
      if(oTmp.equals(in_oRegion2))
        return true;
      if(!oTmp.equals(in_oRegion1)) {
        if(compareToUpperRegion(oTmp, in_oRegion1, in_oRegion2) == true)
          return true;
      }
    }
    return false;
View Full Code Here

      TCGNode in_oSourceNode,
      TCGNode in_oTargetNode) throws Exception
  {
   
    TCGTransition oTransition = GeneratedFactory.eINSTANCE.createTCGTransition();
    TestCaseRegion oRegion = TCGNodeHelperClass.getContainingRegion(in_oSourceNode);
    if(oRegion == null)
      oRegion = TCGNodeHelperClass.getContainingRegion(in_oTargetNode);
    if(oRegion == null)
      throw new Exception("source and target node have no container");
   
    oRegion.getTransitions().add(oTransition);   
   
    oTransition.setSourceNode(in_oSourceNode);
    in_oSourceNode.getOutgoingTransitions().add(oTransition);

    oTransition.setTargetNode(in_oTargetNode);
View Full Code Here

        TestCaseGraph oSubGraph = oRealNode.getSubGraph();
        if(oSubGraph != null) {
          // check all sub-regions
          // TODO parallel sub-regions!!!
          if(!oSubGraph.getRegions().isEmpty()) {
            TestCaseRegion oSubRegion = oSubGraph.getRegions().get(0);
            List<TCGIntermediateNode> colInitialNodes = TCGRegionHelperClass.findInitialNodes(oSubRegion);
            if(!colInitialNodes.isEmpty()) {
              // each region is allowed to have at most one initial node
              TCGIntermediateNode oInitialNode = colInitialNodes.get(0);
              // convert initial node into connection point
View Full Code Here

        TestCaseGraph oSubGraph = oRealNode.getSubGraph();
        if(oSubGraph != null) {
          // check all sub-regions
          // TODO parallel sub-regions!!!
          if(!oSubGraph.getRegions().isEmpty()) {
            TestCaseRegion oSubRegion = oSubGraph.getRegions().get(0);
            if(!colSuperTransitions.isEmpty()) {
              List<TCGNode> colEndNodes = TCGRegionHelperClass.findNodesWithOutOutgoingTransitions(oSubRegion);
              // create outgoing connection point
              TCGIntermediateNode oOutNode = GeneratedFactory.eINSTANCE.createTCGIntermediateNode();
              oOutNode.setOriginalNode(null);
View Full Code Here

        // determining the super state
        TCGRealNode oSuperNode = null;
        if(oIntNode.getContainer() instanceof TCGRealNode)
          oSuperNode = (TCGRealNode)oIntNode.getContainer();
        else if(oIntNode.getContainer() instanceof TestCaseRegion) {
          TestCaseRegion oRegion = (TestCaseRegion)oIntNode.getContainer();
          if(oRegion.getContainer() != null)
            oSuperNode = (TCGRealNode)oRegion.getContainer().getCompositeSuperState();
        }
        int nRealNodeCounter = searchForMinDistanceFromNode(
            oSuperNode, in_nCounter);
        return Math.max(in_nCounter, nRealNodeCounter);
      }
View Full Code Here

        if (result == null) result = caseTCGElement(tcgIntermediateNode);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case GeneratedPackage.TEST_CASE_REGION: {
        TestCaseRegion testCaseRegion = (TestCaseRegion)theEObject;
        T result = caseTestCaseRegion(testCaseRegion);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case GeneratedPackage.TEST_CASE_GRAPH: {
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setContainer(TestCaseRegion newContainer) {
    TestCaseRegion oldContainer = container;
    container = newContainer;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GeneratedPackage.TCG_REAL_NODE__CONTAINER, oldContainer, container));
  }
View Full Code Here

  {
    // reference all used regions for adding the transitions
    if(!io_colStateMachineRegions.contains(in_oRegion)) {
      io_colStateMachineRegions.add(in_oRegion);
   
      TestCaseRegion oTCRegion = GeneratedFactory.eINSTANCE.createTestCaseRegion();
      in_colRegions.add(oTCRegion);
      for(Vertex oVertex : in_oRegion.getSubvertices())
      { 
        if(oVertex instanceof State)
        {
View Full Code Here

TOP

Related Classes of net.sf.parteg.base.testcasegraph.generated.TestCaseRegion

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.