Changeset 1233 for trunk/modelicaml/org.openmodelica.modelicaml.modelica.importer/src/org/openmodelica
- Timestamp:
- 01/24/12 18:01:39 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modelicaml/org.openmodelica.modelicaml.modelica.importer/src/org/openmodelica/modelicaml/modelica/importer/helper/ModelicaMLElementsCreator.java
r1221 r1233 953 953 Classifier clazz = (Classifier)element; 954 954 955 // delete existing opaqueBehaviors 955 /* 956 * Delete existing OpaqueBehaviors before recreating class algorithm or equation sections. 957 * Note, we assume that the proxies are not modified in the ModelicaML model. So that there are no State Machines 958 * or other behavior except OpaqueBehaviors. That is why we only delete OpaqueBehaviors. 959 * One exception: FunctionBehavaior is a sub-type of OpaqueBehavior. These should not be deleted. 960 */ 956 961 EList<Element> existingElements = clazz.getOwnedElements(); 957 962 EList<Behavior> existingBehaviors = new BasicEList<Behavior>(); 958 963 959 964 for (Element existingElement : existingElements) { 960 if (existingElement instanceof OpaqueBehavior ) {965 if (existingElement instanceof OpaqueBehavior && !(existingElement instanceof FunctionBehavior)) { 961 966 existingBehaviors.add((Behavior) existingElement); 962 967 } … … 964 969 965 970 deleteElements(new HashSet<Element>(existingBehaviors)); 971 966 972 967 973 // Create initialAlgorithms
Note: See TracChangeset
for help on using the changeset viewer.