Examples of TCGParameter


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

  //      {
//        if(TCGOCLExpressionHelperClass.getPassiveDependentVariablesAndInputParameters(oOCLExp).size() == 1) {
          for(Object oObject : TCGOCLExpressionHelperClass.getInputParametersFromExpression(oOCLExp)) {
            for(TCGParameter oTCGParameter : in_oEvent.getParameters())
            {
              TCGParameter oReferencedTCGParameter =
                TCGParameterHelperClass.findParameterElementMatchingToReference(
                    oTCGParameter, oTransitionInstance, oObject);
              // referenced parameter
              if(oReferencedTCGParameter != null)
              {
                ValueTypeRange oValueTypeRange =
                  OCLExpressionValueTypeRangeFactory.getValueTypeRangeForRightSideOfExpression(
                    oReferencedTCGParameter, oOCLExp);
                if(oValueTypeRange == null)
                  return ErrorClass.NOSOLUTION;
               
                // return contradiction if integer should be equal to a non-integer value
                if(TCGOCLExpressionHelperClass.isLastIntegerComputationWasIncorrect()) {
                  if (oOCLExp instanceof TCGOCLOperation) {
                    TCGOCLOperation oCallExp = (TCGOCLOperation) oOCLExp;
                    if(oCallExp.getOperationName().equals("="))
                      return ErrorClass.CONTRADICTION;
//                    if(oCallExp.getOperationName().equals(">=")) {
//                      oCallExp.setOperationName(">");
//                    }
                  }
                }
               
                boolean bAdaptationSuccessful = oTransitionInstance.adaptEventParameterValueRanges(
                    oReferencedTCGParameter, oValueTypeRange);
                if(bAdaptationSuccessful) {
                  // remember the elements that should not be considered from now on
                  in_oExpressionChangeLog.getRemovedExpressions().add(oOCLExp);
                }
                else
                  //return ErrorClass.NOSOLUTION;
                  return ErrorClass.CONTRADICTION;
              }
            }
          }
        }
//      }
     
      if(Configuration.isSearchForMutualDependentInputParameters()) {
        /*
         * create event parameter instances for later evaluated expressions
         * - with a reference to the corresponding expression copy
         */
        for(LateEvaluationGroup oGroup : m_oTestCaseRunnerState.getLateEvaluationGroups()) {
         
          List<TCGOCLAtom> colRemovedElements = new ArrayList<TCGOCLAtom>();
          for(TCGOCLAtom oAtom : oGroup.getElementsToFindPostconditionFor()) {
            for(TCGParameter oTCGParameter : in_oEvent.getParameters())
            {
              TCGParameter oReferencedTCGParameter =
                TCGParameterHelperClass.findParameterElementMatchingToReference(
                    oTCGParameter, oTransitionInstance, oAtom);
              // referenced parameter
              if(oReferencedTCGParameter != null)
              {
View Full Code Here

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

    return m_oParameter;
  }
 
  public TCGParameter getSuperParameter()
  {
    TCGParameter oRetValue = m_oParameter;
    while(oRetValue.getContainer() != null)
    {
      oRetValue = oRetValue.getContainer();
    }
    return oRetValue;
  }
View Full Code Here

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

    }
  }
 
  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);
        oComplexTCGParameter.setValueType(in_oParameter.getType());
        oComplexTCGParameter.setName(in_oParameter.getName());
        for(Property oProperty : oParameterClass.getAllAttributes())
        {
          TCGParameter oParam = createTCGParameter(oProperty);
          oComplexTCGParameter.getParameter().add(oParam);
        }
        oRetParam = oComplexTCGParameter;
      } else {
        oRetParam = createPrimitiveTCGParameter(in_oParameter);
View Full Code Here

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

 
  public static String getFullParameterInstanceAttributeName(
      EventParameterInstance in_oParameterInstance)
  {
    StringBuffer sRetValue = new StringBuffer();
    TCGParameter oParameter = in_oParameterInstance.getParameter();
    TCGParameter oParameterContainer = oParameter.getContainer();
    while(oParameterContainer != null)
    {
      sRetValue.insert(0, "." + oParameter.getName());
      oParameter = oParameterContainer;
      oParameterContainer = oParameter.getContainer();
View Full Code Here

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

    }
    else if(in_oParameter instanceof TCGComplexParameter) {
      TCGComplexParameter oComplexParameter = (TCGComplexParameter)in_oParameter;
      for(TCGParameter oSubParameter : oComplexParameter.getParameter())
      {
        TCGParameter oFoundParameter = findParameterElementMatchingToReference(
            oSubParameter, in_oTransitionInstance, in_oReference);
        if(oFoundParameter != null)
          return oFoundParameter;
      }
    }
View Full Code Here

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

   
    // both events have the same name and the same parameters
    if((in_oEvent1.getParameters().size() == in_oEvent2.getParameters().size()) &&
      ObjectComparator.equals(in_oEvent1.getName(), in_oEvent2.getName())) {
      for(int i = 0; i < in_oEvent1.getParameters().size(); ++i) {
        TCGParameter oParam1 = in_oEvent1.getParameters().get(i);
        TCGParameter oParam2 = in_oEvent2.getParameters().get(i);
        if(!(ObjectComparator.equals(oParam1.getName(),
            oParam2.getName()) &&
          ObjectComparator.equals(oParam1.getValueType(),
              oParam2.getValueType()))) {
          return false;
        }
      }
      return true;
    }
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.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

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

   
    // iterate through all collected parameter instances
    for(EventParameterInstance oParameter : in_colParameters.keySet()) {
      if(!oParameter.isReturnParameter()) {

        TCGParameter oSuperParam = TCGParameterHelperClass.getSuperParameter(
            oParameter.getParameter());
       
        // the super parameter is not the original parameter and was not used yet
        if(!oSuperParam.equals(oParameter.getParameter())) {
          if(!colRealParameter.contains(oSuperParam)) {
            colRealParameter.add(oSuperParam);
            // print all complex parameters
            m_oFormattedOutput.appendln("<define " +
                "name =\"" + oSuperParam.getName()
                + oParameter.getTransitionInstance().getName() +
                "\" type=\"" + getClassName(oSuperParam.getValueType())
                + "\"/>");
          }
          // print the referenced attribute properties
          m_oFormattedOutput.append("<assign ");
          printParameterValue(in_colParameters, oParameter);
View Full Code Here

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

         
          for(int i = 0; i < oParamList.size(); ++i) {
            if(i == oParamList.size() - 1) {
              in_oFormattedOutput.decreaseIndent();
            }
            TCGParameter oParameter = oParamList.get(i);
            in_oFormattedOutput.appendln("<param name=\"" +
                oParameter.getName() + sNameSuffix + "\"/>");
          }
          in_oFormattedOutput.appendln("</call>");
        }
      }
    }
View Full Code Here

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

     
      if(oParameter.isReturnParameter()) {
        continue;
      }

      TCGParameter oSuperParam = TCGParameterHelperClass.getSuperParameter(
          oParameter.getParameter());
     
      // the super parameter is not the original parameter and was not used yet
      if(!oSuperParam.equals(oParameter.getParameter()))
      {
        if(!colRealParameter.contains(oSuperParam))
        {
          colRealParameter.add(oSuperParam);
          // print all complex parameters
          m_oFormattedOutput.append(getClassName(oSuperParam.getValueType()) + " ");
          m_oFormattedOutput.appendln(oSuperParam.getName()
              + oParameter.getTransitionInstance().getName() + " = new " +
              getClassName(oSuperParam.getValueType()) + "();");
        }
        // print the referenced attribute properties
        printParameterValue(in_colParameters, oParameter);
      }
      else
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.