gumtree-spoon-ast-diff
gumtree-spoon-ast-diff copied to clipboard
[bug] virtual nodes do not have position
The virtual nodes should have the position inferred from the children or parent (depending the case). For example, for the virtual that groups modifiers, the start position should be taken from the first modifier, and the end position from the end position of the last modifier.
It can be fixed as the FakeTree does: https://github.com/GumTreeDiff/gumtree/blob/1439d6657bbb5ce6aad6db261fbaa57fc811b7eb/core/src/main/java/com/github/gumtreediff/tree/FakeTree.java#L54
(However, note that we cannot use FakeTree for virtual nodes, because FakeTrees do not have matadata, and our virtuals need to have metadata to point to the ctelements)