Most static analysis techniques over source code start with constructing an Abstract Syntax Tree (AST), or constructing call graphs. Eclipse JDT has tools necessary to do these tasks. It is straightforward to traverse through the AST to collect information about the lines, methods, loops, conditions, variables, etc., used in the source code. Here’s a simple example where you can just insert your code whenever Eclipse JDT finds a method declaration node in the AST. Read more here.
Add new comment