-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offsets are all zeros [0,0] #323
Comments
Hi! Thanks for the bug report! It seems that we don't support node position in the tree created using Gumtree APIs even though Gumtree provides with APIs such as May I ask what kind of position are you interested in? Should it be line number-based or column-based? |
I would like to have the exact offsets similar to the way that GT jdt visitor provides. [Startoffset-EndOffset] |
I believe I could add integers returned by these two APIs then. I understand that it gives the index of start and end character. |
That would be perfect. I couldnt make it work because the position was from NoSourcePosition, but I am pretty sure you know how to deal with that. |
That would be the case for implicit elements like default constructor, but for other elements, it should work. Gumtree tree based on Spoon should not contain implicit elements in my opinion. It is a good point and I will add a test for it. |
Hello, I am just getting started with Spoon.
I am trying to add GT-Spoon as one of the tools for our DiffBenchmark. However, I stumbled upon a problem which is having zeros as all the offsets. Our benchmark is originally built for gumtree-jdt visitor but we want to find the eqv subtree for other visitors by relying on the offsets.
I have tried the ASTComperator with the annotation example, and tried to print the generated trees using the following code:
However the offsets are all shown as zero:
The text was updated successfully, but these errors were encountered: