Package org.xilaew.atg.model.activityTestCaseGraph

Examples of org.xilaew.atg.model.activityTestCaseGraph.TCGVariable


   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetVariable(TCGVariable newVariable, NotificationChain msgs) {
    TCGVariable oldVariable = variable;
    variable = newVariable;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ActivityTestCaseGraphPackage.TCGOCL_VARIABLE_CALL_EXP__VARIABLE, oldVariable, newVariable);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here


  }

  @Override
  public String caseTCGOCLVariableCallExp(TCGOCLVariableCallExp object) {
    StringBuilder result = new StringBuilder();
    TCGVariable var = object.getVariable();
    result.append(var.getName());
    if (!var.isIsParameter()) {
      result.append("[i");
      if (object.isIsPre()) {
        result.append("-1");
      }
      result.append("]");
View Full Code Here

      sb.append("reset data;\n");
      sb.append("data " + filename + i + ".dat;\n");
      sb.append("solve;\n");
      sb.append("display ");
      Iterator<TCGVariable> it = tcgActivity.getVariables().iterator();
      TCGVariable var;
      while (it.hasNext()) {
        var = it.next();
        sb.append(var.getName() + (it.hasNext() ? ", " : ";\n"));
      }
    }
    return sb.toString();
  }
View Full Code Here

  protected AbstractTCGElement handleParameter(Parameter umlParameter) {
    // XXX maybe one could make a difference between Variables and
    // Parameters, since OCL semantic says Parameters are Immutable within
    // an activity.
    Type umlType = umlParameter.getType();
    TCGVariable tcgVar = null;
    TCGBasicVariableType tcgType = null;
    tcgType = TCGBasicVariableType.getByName(umlType.getName());
    if (tcgType != null) {
      tcgVar = factory.createTCGBasicVariable();
      ((TCGBasicVariable) tcgVar).setVariableType(tcgType);
    } else {
      tcgVar = factory.createTCGVariable();
      // TODO recurse into object type Variables.
    }
    tcgVar.setUsage(UMLHelper.getUsage(umlParameter));
    tcgVar.setIsParameter(true);
    tcgVar.setName(umlParameter.getName());
    tcgActivity.getVariables().add(tcgVar);
    return tcgVar;
  }
View Full Code Here

    return tcgVar;
  }

  protected AbstractTCGElement handleProperty(Property umlProperty) {
    Type umlType = umlProperty.getType();
    TCGVariable tcgVar = null;
    TCGBasicVariableType tcgType = null;
    tcgType = TCGBasicVariableType.getByName(umlType.getName());
    if (tcgType != null) {
      tcgVar = factory.createTCGBasicVariable();
      ((TCGBasicVariable) tcgVar).setVariableType(tcgType);
    } else {
      tcgVar = factory.createTCGVariable();
      // TODO recurse into object type Variables.
    }
    tcgVar.setName(umlProperty.getName());
    tcgVar.setIsParameter(false);
    tcgActivity.getVariables().add(tcgVar);
    return tcgVar;
  }
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setVariable(TCGVariable newVariable) {
    TCGVariable oldVariable = variable;
    variable = newVariable;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, TestsPackage.VALUE__VARIABLE, oldVariable, variable));
  }
View Full Code Here

TOP

Related Classes of org.xilaew.atg.model.activityTestCaseGraph.TCGVariable

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.