gumtree icon indicating copy to clipboard operation
gumtree copied to clipboard

Modifications on Extends and Implements are not detected

Open alkalinan opened this issue 4 years ago • 4 comments

Hello,

when using gumtree (swingdiff or webdiff) on this case : p no change is detected... However there is an obvious change on the class A declaration by using extends or implements.

When I look at the ITree and TreeContext, it seems that Gumtree is extracting all simpleTypes, ParametrizeType, and typeParameters without knowing if there are part of the extends or the implements declarations.

alkalinan avatar Aug 20 '19 22:08 alkalinan

Could you try with https://github.com/SpoonLabs/gumtree-spoon-ast-diff/?

monperrus avatar Aug 21 '19 05:08 monperrus

Hi, unfortunately no because I am using Gumtree v2.1.3 which includes TreeDelete and TreeInsert. There are not yet implemented in the current version of gumtree-spoon.

Or do you want me to try to see if the behavior is the same ?

alkalinan avatar Aug 21 '19 09:08 alkalinan

I believe @monperrus is asking you to see if the behavior is the same. I know what is causing the problem : extends / implements is not part of the Jdt AST, it's only a property on the type node, therefore I have to rewrite the AST to make this token explicit. However it is a little tedious since there can be both extends and implements on a type definition.

jrfaller avatar Sep 25 '19 13:09 jrfaller

I confirm that:

  • gumtree-spoon depends on gumtree 2.1.2 and not on 2.1.3
  • gumtree-spoon well implements the extends / implements detection

monperrus avatar Sep 25 '19 18:09 monperrus

BTW, working well in GumTree now.

jrfaller avatar Nov 27 '23 19:11 jrfaller