Background

JavaParser is a library which converts Java source code into an abstract/concrete syntax tree. This syntax tree can then be used to inspect, analyse, and modify Java programs!

Understanding the syntax tree that is generated can be a bit tricky, though. Especially if you end up elbow deep stepping through your debugger! #sadtimes

Hack -- IntelliJ Plugin

This is where visuals -- and this project(!!) -- come in.

Being able to see which parts of the source code are "children" of other parts (nodes) makes it much easier to know which nodes should be queried/edited -- for example, being able to see that a method's return type and it's public/private modifiers are children of a MethodDeclaration.

Struggles

  • IntelliJ plugin API - services and PSIs and Swing :(
  • Swing :(

Stuff I've Learned

  • Gradle
  • Confirmation that JavaScript is much better than Java....

Built With

Share this project:

Updates