Package org.eclipse.ocl.uml

Examples of org.eclipse.ocl.uml.VariableExp


      {
        for(TCGParameter oParameter : in_oTCGEvent.getParameters())
        {
          // reference of parameter needs to be equal to
          // the represented parameter of the variable of the ocl reference of the atom
          VariableExp oVarExp = TestCaseGraphHelper.getVariableExp((OCLExpression)oAtom.getOclReference());
          if(oParameter.getReference().equals(oVarExp.getReferredVariable().getRepresentedParameter()))
          {
            if(oAtom.getOclReference() instanceof PropertyCallExp)
            {
              // find sub-parameter corresponding to the referenced property
              TCGParameter oParam = TCGParameterHelperClass.findParameterElementMatchingToReference(
View Full Code Here


      org.eclipse.ocl.expressions.OCLExpression<?> in_oExpression)
  {
    // parameter is a variable
    if(in_oExpression instanceof VariableExp)
    {
      VariableExp oVarExp = (VariableExp)in_oExpression;
      if(oVarExp.getReferredVariable() != null)
        if(oVarExp.getReferredVariable().getRepresentedParameter() != null)
          return (VariableExp)in_oExpression;
    }
    // parameter is an abstract data type - in expression only an attribute is referenced
    else if(in_oExpression instanceof PropertyCallExp)
    {
View Full Code Here

//      oContextClass = ((org.eclipse.uml2.uml.Operation)in_oNamespace).getClass_();
   
    TCGOCLExpression oTCGOCLExpression = null;
    if(in_oExpression != null)
    {
      VariableExp oVarExp = TestCaseGraphHelper.getVariableExp(in_oExpression);
      if(oVarExp != null)
      {
        TCGOCLAtom oAtom = GeneratedFactory.eINSTANCE.createTCGOCLAtom();
        oAtom.setElement(oVarExp.getReferredVariable());
//        oAtom.setElement(oVarExp.getReferredVariable().getRepresentedParameter());
//        oAtom.setElement(in_oExpression);
        oTCGOCLExpression = oAtom;
        oTCGOCLExpression.setClassification(classifyOCLExpression(oVarExp, in_sOCLTypeId));
      }
View Full Code Here

      org.eclipse.ocl.expressions.OCLExpression<?> in_oExpression)
  {
    // parameter is a variable
    if(in_oExpression instanceof VariableExp)
    {
      VariableExp oVarExp = (VariableExp)in_oExpression;
      if(oVarExp.getReferredVariable() != null) {
        if(oVarExp.getReferredVariable().getRepresentedParameter() != null)
          return (VariableExp)in_oExpression;
      }
      else
        return oVarExp;
    }
View Full Code Here

  public static double getValue(TCGOCLExpression in_oTCGOCLExpression) throws Exception
  {
    if(in_oTCGOCLExpression instanceof TCGOCLAtom)
    {
      TCGOCLAtom oPropExp = (TCGOCLAtom)in_oTCGOCLExpression;
      VariableExp oVarExp = null;
      if(oPropExp.getElement() instanceof OCLExpression)
      {
        oVarExp = TestCaseGraphHelper.getVariableExp((OCLExpression)oPropExp.getElement());
      }
     
View Full Code Here

      oContextClass = ((org.eclipse.uml2.uml.Operation)in_oNamespace).getClass_();
   
    TCGOCLExpression oTCGOCLExpression = null;
    if(in_oExpression != null)
    {
      VariableExp oVarExp = TestCaseGraphHelper.getVariableExp(in_oExpression);
      if(oVarExp != null)
      {
        TCGOCLAtom oAtom = GeneratedFactory.eINSTANCE.createTCGOCLAtom();
        //oAtom.setElement(oVarExp.getReferredVariable());
        oAtom.setElement(in_oExpression);
View Full Code Here

    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?
View Full Code Here

TOP

Related Classes of org.eclipse.ocl.uml.VariableExp

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.