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

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


        if (result == null) result = caseTCGOCLExpression(tcgoclIfThenElse);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case GeneratedPackage.TCG_PARAMETER: {
        TCGParameter tcgParameter = (TCGParameter)theEObject;
        T result = caseTCGParameter(tcgParameter);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case GeneratedPackage.TCG_PRIMITIVE_PARAMETER: {
View Full Code Here


  public TCGParameter getCorrespondingParameterCopyInNode(TCGParameter in_oParameter, TCGNode in_oNode)
  {
    for(TCGParameter oParam : in_oNode.getParameters())
    {
      //if(oParam.getReference().equals(in_oParameter.getReference()))
      TCGParameter oMatchingParam = TCGParameterHelperClass.findParameterElementMatchingToReference(
          oParam, in_oParameter.getReference());
      if (oMatchingParam != null)
      {
        // properties von Parametern haben keine Namen ... warum eigentlich nicht?
        //if(oMatchingParam.getName().compareTo(in_oParameter.getName()) == 0)
View Full Code Here

        // default-trigger has no operation
        if(oOperation != null)
        {
          for(Parameter oParameter : oOperation.getOwnedParameters())
          {
            TCGParameter oTCGParameter = addTCGParameter(io_oTransition, oParameter);
            io_oTCGEvent.getParameters().add(oTCGParameter);
          }
        }
      }
    }
View Full Code Here

          if(oParameter.getReference().equals(oVarExp.getReferredVariable().getRepresentedParameter()))
          {
            if(oAtom.getOclReference() instanceof PropertyCallExp)
            {
              // find sub-parameter corresponding to the referenced property
              TCGParameter oParam = TCGParameterHelperClass.findParameterElementMatchingToReference(
                  oParameter, ((PropertyCallExp)oAtom.getOclReference()).getReferredProperty());
              if(oParam != null)
                oAtom.setTcgParameter(oParam);
              else
                oAtom.setTcgParameter(oParameter);
View Full Code Here

 
  private static TCGParameter addTCGParameter(TCGTransition in_oTransition, Parameter in_oParameter)
  {
    // TODO TCGPrimitiveParamter erzeugen!
    TCGParameter oTCGParameter = TCGParameterHelperClass.createTCGParameter(in_oParameter);
    // name of the externally used parameter (needs to be unique)
    oTCGParameter.setName(in_oParameter.getName() + "_" + in_oTransition.getTargetNode().getParameters().size());

    oTCGParameter.setDefiningTransition(in_oTransition);
    in_oTransition.getTargetNode().getParameters().add(oTCGParameter);
   
    return oTCGParameter;
  }
View Full Code Here

        {
          TCGOCLAtom oAtom = (TCGOCLAtom)((TCGOCLOperation)in_oExpression).getLeft();
          // interesting element is a variable - get all the necessary values
          if(getVariable(oAtom.getElement()) != null)
          {
            TCGParameter oCorrespondingParam = getCorrespondingParameterCopyInNode((TCGParameter)oAtom.getTcgParameter(), in_oBackTrackStartNode);
            if(!DomainHelper.adaptDomain(oCorrespondingParam, oEqClass))
              return false;
          }
          // interesting value is passive dependent -> find matching active dependent and go on ...
          else if(oAtom.getElement() instanceof Property)
View Full Code Here

      TCGNode in_oSuperNode, TCGNode in_oSubNode)
  {
    // iterate over parameters of first node
    for(TCGParameter oFirstParameter : in_oSuperNode.getParameters())
    {
      TCGParameter oSecondParameter = null;
      // iterate over parameters of second node
      for(TCGParameter oParameter : in_oSubNode.getParameters())
      {
        if(oParameter.getReference().equals(oFirstParameter.getReference()))
        {
View Full Code Here

    }
  }
 
  public static TCGParameter createTCGParameter(ConnectableElement in_oParameter)
  {
    TCGParameter oRetParam = null;
    if(in_oParameter.getType() instanceof org.eclipse.uml2.uml.Class)
    {
      // create complex parameter
      org.eclipse.uml2.uml.Class oParameterClass = (org.eclipse.uml2.uml.Class)in_oParameter.getType();
      if(oParameterClass.getAllAttributes().size() > 0)
      {
        TCGComplexParameter oComplexTCGParameter = GeneratedFactory.eINSTANCE.createTCGComplexParameter();
        oComplexTCGParameter.setReference(in_oParameter);
        // TODO entfernen?
//        oComplexTCGParameter.setType(in_oParameter.getType());
        // TODO bei rekursiven Strukturen sollten die Parameter erst "on demand" aufgebaut werden
        for(Property oProperty : oParameterClass.getAllAttributes())
        {
          TCGParameter oParam = createTCGParameter(oProperty);
          oComplexTCGParameter.getParameter().add(oParam);
        }
        oRetParam = oComplexTCGParameter;
      } else {
        oRetParam = createPrimitiveTCGParameter(in_oParameter);
View Full Code Here

  public static void copyParameters(TCGNode in_oSource, TCGNode io_oTarget)
  {
    for(TCGParameter oOldParameter : in_oSource.getParameters())
    {
      TCGParameter oNewParameter = copyParameter(oOldParameter);
      io_oTarget.getParameters().add(oNewParameter);
    }
  }
View Full Code Here

    }
  }
 
  private static TCGParameter copyParameter(TCGParameter in_oParameter)
  {
    TCGParameter oNewParameter = null;
    if(in_oParameter instanceof TCGPrimitiveParameter)
    {
      oNewParameter = GeneratedFactory.eINSTANCE.createTCGPrimitiveParameter();
    }
    else if(in_oParameter instanceof TCGComplexParameter)
    {
      TCGComplexParameter oNewComplexParameter = GeneratedFactory.eINSTANCE.createTCGComplexParameter();
      for(TCGParameter oSubParam : ((TCGComplexParameter)in_oParameter).getParameter())
      {
        TCGParameter oNewSubParam = copyParameter(oSubParam);
        oNewComplexParameter.getParameter().add(oNewSubParam);
      }
      oNewParameter = oNewComplexParameter;
    }
    if(oNewParameter != null)
View Full Code Here

TOP

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

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.