Ignore:
Timestamp:
03/29/12 23:08:56 (13 years ago)
Author:
wschamai
Message:

BUG FIX: concurrent list modification

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modelicaml/org.openmodelica.modelicaml.common/src/org/openmodelica/modelicaml/common/contentassist/ModelicaMLContentAssist.java

    r857 r1469  
    281281        // add the rest (predefined properties) in order to support the validation
    282282       
    283         // TODO: here a concurrent modification error occurres somtimes
     283        // TODO: here a concurrent modification error occurs sometimes
    284284        sortedList.addAll(predefinedVariablePropertiesList);
    285285        sortedList.addAll(predefinedFunctionsList);
     
    287287       
    288288        // if it is a component modification then add all possible sub components of the component being modified
    289         if (propertyName != null) {
    290             sortedList.addAll(getFullModifiedComponentReferenceSortedList());
    291         }
     289//      if (propertyName != null) {
     290            // !!!!!!!! This causes concurrent modification of the predefinedVariablePropertiesList
     291//          sortedList.addAll(getFullModifiedComponentReferenceSortedList());
     292//      }
    292293       
    293294        Collections.sort(sortedList, String.CASE_INSENSITIVE_ORDER);
     
    400401            }
    401402            // collect the predefined properties
    402             for (String reference : predefinedVariablePropertiesList) {
     403            HashSet<String> predefinedVarListProp = new HashSet<String>();
     404            predefinedVarListProp.addAll(predefinedVariablePropertiesList);
     405            for (String reference : predefinedVarListProp) {
    403406                if (reference.startsWith(propertyName)) {
    404407                    //sortedList.add(reference); // IMPORTANT: this is used for component tree in order to enable modifications that are stored in first level components.
Note: See TracChangeset for help on using the changeset viewer.