Ignore:
Timestamp:
01/24/12 18:01:39 (13 years ago)
Author:
wschamai
Message:

bug fix: sync. of proxies behavior (FunctionBehavior? should not be deleted)

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  
    953953            Classifier clazz = (Classifier)element;
    954954           
    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             */
    956961            EList<Element> existingElements = clazz.getOwnedElements();
    957962            EList<Behavior> existingBehaviors = new BasicEList<Behavior>();
    958963
    959964            for (Element existingElement : existingElements) {
    960                 if (existingElement instanceof OpaqueBehavior) {
     965                if (existingElement instanceof OpaqueBehavior && !(existingElement instanceof FunctionBehavior)) {
    961966                    existingBehaviors.add((Behavior) existingElement);
    962967                }
     
    964969           
    965970            deleteElements(new HashSet<Element>(existingBehaviors));
     971           
    966972           
    967973            // Create initialAlgorithms
Note: See TracChangeset for help on using the changeset viewer.