Changeset 1599 for trunk


Ignore:
Timestamp:
08/01/12 17:18:09 (12 years ago)
Author:
wschamai
Message:

MOD: for the requirement property "status" set the the start value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modelicaml/org.openmodelica.modelicaml.profile/src/org/openmodelica/modelicaml/profile/handlers/CreateModelicaRequirementHandler.java

    r1375 r1599  
    210210           
    211211            Property statusAttribute = element.getOwnedAttribute(Constants.propertyName_mStatus, integerType, true, UMLPackage.Literals.PROPERTY, true);
    212             Stereotype violatedAttributeStereotype = statusAttribute.getApplicableStereotype("ModelicaML::ModelicaCompositeConstructs::Variable");
    213             if (statusAttribute.getAppliedStereotype(violatedAttributeStereotype.getQualifiedName()) == null) {
    214                 statusAttribute.applyStereotype(violatedAttributeStereotype);
    215                 statusAttribute.setValue(violatedAttributeStereotype, "causality", "output");
     212            Stereotype statusAttributeStereotype = statusAttribute.getApplicableStereotype(Constants.stereotypeQName_Variable);
     213            if (statusAttribute.getAppliedStereotype(statusAttributeStereotype.getQualifiedName()) == null) {
     214                statusAttribute.applyStereotype(statusAttributeStereotype);
     215                statusAttribute.setValue(statusAttributeStereotype, Constants.propertyName_causality, Constants.propertyName_output);
     216               
     217               
     218                // add default solver settings
     219                List<String> modification = new ArrayList<String>(); // new modification value
     220                modification.add("start=0");
     221                modification.add("fixed=true");
     222               
     223                statusAttribute.setValue(statusAttributeStereotype, Constants.propertyName_modification, modification);
    216224            }
    217225           
Note: See TracChangeset for help on using the changeset viewer.