Comments (10)
from gumtree.
You can search for the first ancestor of type TypeDeclaration and look its SimpleName child, would it answer your question?
from gumtree.
I am not sure, so I was having a look at the file HtmlDiffs.java file, through which I can access all the changes and their properties via (ITree t) , should I access the parents of 't' to get to the method or class to which it belongs ?
For ex
public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } }
If the print statement is modified , I want to view that there was a change in the main
method and HelloWorld
class.
from gumtree.
You need to have at hand the ITree corresponding to the file
Then simply go through the ancestors of the modified node (getParents if I remember correctly) until you find a MethodDeclaration and a TypeDeclaration, and look for the direct SimpleName child of these nodes.
from gumtree.
Thanks a lot , I will have a look
from gumtree.
Yeah figured it out , Thanks.
BTW will it be useful to show the classes and methods which have changes in the "listdiff" ? If yes I can work on it and send a corresponding PR.
from gumtree.
from gumtree.
I was thinking of providing something like classes and methods that have changed in a file (for now will be only JAVA file) from left to right version .
from gumtree.
Maybe this would be best done via a dedicated GumTree client tailored for the analysis of a specific language?
from gumtree.
Makes sense. I will list down a few parameters that we can output using GumTree for JAVA code change analysis and get it reviewed.
I can start working on the client thereafter.
from gumtree.
Related Issues (20)
- Wrong position info of tree node HOT 5
- Tool installation on Windows HOT 1
- webdiff issue HOT 1
- no ast HOT 2
- Diff is not fine-grained HOT 9
- Option for disabling move operation HOT 3
- add support for s-expression trees HOT 1
- redundant edit script about insert and delete operations on unmodifie code HOT 3
- Customizable label truncation and format for output (dotdiff) HOT 1
- How to view the algorithm execution process
- add known mappings to zsmatcher HOT 1
- Gradle build failed HOT 1
- Empty EditScript from non-empty diff HOT 5
- add support for Go HOT 4
- Feature request: Markdown support HOT 2
- Packaging and build issues
- How to simplify GTD's actions? HOT 1
- Confusing results generated by GTD HOT 2
- Confusion about Move action HOT 1
- Error while running gumtree with textdiff option HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gumtree.