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)
- Confusing results generated by GTD HOT 2
- Confusion about Move action HOT 1
- Error while running gumtree with textdiff option HOT 16
- 3.0 jdt tree generator does not handle the type arguments of MethodInvocation HOT 4
- No syntax exception raised in some cases for JDT HOT 16
- Order ignored? HOT 3
- Respect .gitignore HOT 9
- `textdiff` has inconsistent range output between formats HOT 3
- Support for renaming files HOT 1
- Docker Image HOT 1
- Reversed left and right in git gd command HOT 1
- Steps to get AST Diff for Python Files HOT 5
- ClassNotFound `org/simmetrics/StringMetrics` HOT 15
- Can't generate a parse tree I get this error HOT 1
- ast diff in with gumtree in the browser for file diff on Github
- generate edit script through command HOT 3
- use gumtree diff two commit edit script HOT 2
- use treesitter parse ast failed HOT 4
- JdtVisitor ignores optionalTagName for javadocs HOT 9
- What is the difference between monaco, classic, monaco-native? HOT 5
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.