mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Merge Lists
This commit is contained in:
parent
4876461e51
commit
042f47dbef
1 changed files with 8 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue