mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 16:58:56 +00:00
Merge pull request #724 from eclipse/ak/fixed_node_replacement
[NodeModel] replace a first child of a new node with null if an old does not have children
This commit is contained in:
commit
b5e0f8cdfc
1 changed files with 1 additions and 1 deletions
|
@ -330,8 +330,8 @@ public class NodeModelBuilder {
|
|||
CompositeNode oldComposite = (CompositeNode) oldNode;
|
||||
CompositeNode newComposite = (CompositeNode) newNode;
|
||||
AbstractNode child = oldComposite.basicGetFirstChild();
|
||||
newComposite.basicSetFirstChild(child);
|
||||
if (child != null) {
|
||||
newComposite.basicSetFirstChild(child);
|
||||
while(child.basicGetParent() != newComposite) {
|
||||
child.basicSetParent(newComposite);
|
||||
child = child.basicGetNextSibling();
|
||||
|
|
Loading…
Reference in a new issue