Package net.sf.parteg.base.testcasegraph.helperclasses

Examples of net.sf.parteg.base.testcasegraph.helperclasses.AttributeGetterReferencer


    // create TestCaseGraphTree
    m_oTCG = GeneratedFactory.eINSTANCE.createTestCaseGraph();

    m_oHistory = new SystemModelStateHistory();
    m_colOCLReferencingElements = new VariableReferencer();
    m_colAttributeGetterReferencer = new AttributeGetterReferencer();
    m_oLogger = new Logger();
  }
View Full Code Here


      TransitionInstance in_oTransitionInstance,
      TCGOCLAtom in_oAtomExp,
      FormattedOutput in_oFormattedOutput)
  {
    // references from system attributes to the corresponding getter operations
    AttributeGetterReferencer oAttrOpRef = m_oTCGHelper.getAttributeGetterReferencer();
   
    if(in_oAtomExp.getOclReference() instanceof PropertyCallExp)
    {
      Property oPropReference = (Property)(((PropertyCallExp)in_oAtomExp.getOclReference()).getReferredProperty());
      VariableExp oVarExp = TestCaseGraphHelper.getVariable(in_oAtomExp.getOclReference());
      if(oVarExp != null)
      {
        boolean bFoundMatchingParameterInstance = false;
        for(EventParameterInstance oParameterInstance : TCGParameterHelperClass.
            findTransitionInstanceDefiningTheCurrentEvent(in_oTransitionInstance).getParameterInstances())
        {
          if(oParameterInstance.getParameter().getReference().equals(oPropReference))
          {
            in_oFormattedOutput.append(
                TCGParameterHelperClass.
                getFullParameterInstanceAttributeName(oParameterInstance));
            if(oParameterInstance.getParameter().getValueType() instanceof TypedElement) {
              TypedElement oVT = (TypedElement)oParameterInstance.getParameter().getValueType();
              in_oFormattedOutput.append(getTypeNameAccessFunction(oVT.getType().getName()));
            }
            bFoundMatchingParameterInstance = true;
          }
        }
        // found no actually used parameter instance for the property reference
        // -> search for parameter
        if(bFoundMatchingParameterInstance == false)
        {
          String sPropName = TestCaseGraphHelper.getFullPropertyName(oPropReference, oVarExp.getType());
          in_oFormattedOutput.append(oVarExp.getName()
              + TCGParameterHelperClass.findTransitionInstanceDefiningTheCurrentEvent(
                  in_oTransitionInstance).getName() + "."
              + sPropName);
          in_oFormattedOutput.append(getTypeNameAccessFunction(oVarExp.getType().getName()));
        }
      }
      else
      {
        // TODO unvollst�ndige Ausgabebehandlung -> inwiefern?
        // get getter operation
        String sPropName = oPropReference.getName();
        Operation oOp = oAttrOpRef.get(oPropReference);
        if(oOp != null) {
          sPropName = oOp.getName() + "()";
        }
        in_oFormattedOutput.append(m_sObjectName + "." + sPropName);
        in_oFormattedOutput.append(getTypeNameAccessFunction(oPropReference.getType().getName()));
View Full Code Here

TOP

Related Classes of net.sf.parteg.base.testcasegraph.helperclasses.AttributeGetterReferencer

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.