Package org.eclipse.ocl.uml

Examples of org.eclipse.ocl.uml.Variable


   */
  public static String getEnumStringValue(TCGOCLExpression in_oTCGOCLExpression)
      throws Exception {
    if (in_oTCGOCLExpression instanceof TCGOCLAtom) {
      TCGOCLAtom oPropExp = (TCGOCLAtom) in_oTCGOCLExpression;
      Variable oVar = null;
      if (oPropExp.getElement() instanceof Variable) {
        oVar = (Variable)oPropExp.getElement();
      }
   
      if (oVar != null) {
View Full Code Here


      TCGOCLAtom oPropExp = (TCGOCLAtom) in_oTCGOCLExpression;
      if(in_colValueAssignments.keySet().contains(oPropExp)) {
        return in_colValueAssignments.get(oPropExp).getValue();
      }
     
      Variable oVar = null;
      if (oPropExp.getElement() instanceof Variable) {
        oVar = (Variable)oPropExp.getElement();
      }
   
      if (oVar != null) {
View Full Code Here

    else if(in_oAtomExp.getOclReference() instanceof VariableExp)
    {
      for(EventParameterInstance oParameterInstance : TCGParameterHelperClass.
          findTransitionInstanceDefiningTheCurrentEvent(in_oTransitionInstance).getParameterInstances())
      {
        Variable oVar = (Variable)in_oAtomExp.getElement();
        // get matched event parameter
//        EObject oMatchedEventParameter =
//          TCGEventHelperClass.getMapExprParamToEventParam().get(oVar.getRepresentedParameter());
//        if(oMatchedEventParameter == null)
//          oMatchedEventParameter = oVar.getRepresentedParameter();
//        if(oParameterInstance.getParameter().getReference().equals(oMatchedEventParameter)) {
        TCGTransition oTraversedTransition = in_oTransitionInstance.getTransition();
        List<Parameter> colMatchedEventParameters = new ArrayList<Parameter>();
        colMatchedEventParameters.add(oVar.getRepresentedParameter());
        if(oTraversedTransition != null) {
          colMatchedEventParameters.addAll(
            TCGEventHelperClass.getEventParameters(
                oVar.getRepresentedParameter(), oTraversedTransition));
        }
         
        if(colMatchedEventParameters.contains(oParameterInstance.getParameter().getReference())) {
          in_oFormattedOutput.append(
              TCGParameterHelperClass.
View Full Code Here

  }
 
  public static void oclAtomConstraintVisitor(TCGOCLAtomImpl tcgOCLAtomConstraint){

    if (tcgOCLAtomConstraint.getElement() instanceof Variable) {  //input parameter
      Variable oVar = (Variable)tcgOCLAtomConstraint.getElement();
      if (oVar != null) {       
        //add variable
        TCGVariable toBeAdd = new TCGVariable();
        if(oVar.getRepresentedParameter() != null && oVar.getRepresentedParameter().getDefaultValue() != null)
          toBeAdd.setInitialValue(oVar.getRepresentedParameter().getDefaultValue().stringValue());
        toBeAdd.setName(oVar.getName());
        toBeAdd.setType(typeOfVariable(oVar.getType()));
        toBeAdd.setIsParameter(true);
        if(toBeAdd.getType() != null && !AllVariables.contains(toBeAdd))
          AllVariables.add(toBeAdd);   
      }
    }
View Full Code Here

TOP

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

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.