1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Merge Lists

This commit is contained in:
Emanuel Graf 2009-11-24 07:16:32 +00:00
parent 4876461e51
commit 042f47dbef

View file

@ -127,8 +127,14 @@ public class ChangeGenerator extends CPPASTVisitor {
List<ASTModification> modificationsForNode = rootModifications
.getModificationsForNode(modifiedNode);
IASTNode modifiedNodeParent = determineParentToBeRewritten(modifiedNode, modificationsForNode);
List<ASTModification> list = modificationParent.get(modifiedNodeParent != null ? modifiedNodeParent : modifiedNode);
if(list != null){
list.addAll(modificationsForNode);
}else{
List<ASTModification> modifiableList = new ArrayList<ASTModification>(modificationsForNode);
modificationParent.put(modifiedNodeParent != null ? modifiedNodeParent : modifiedNode,
modificationsForNode);
modifiableList);
}
}
}
}