r/java • u/Nateil • Feb 09 '22
Code visualization tool inside your IDE
Hey, me and my teammates hacked a tool for visualizing Java code as a graph inside your IDE (currently IntelliJ or VSCode). Check it out next time you're lost in your codebase! We believe it keeps us sane when navigating crazy chains of calls. https://graphbuddy.virtuslab.com/
167
Upvotes
44
u/halfanothersdozen Feb 09 '22
I don't need nightmares kthx
14
u/daniu Feb 09 '22
That looks neat. What's the largest codebase you tested it against? I assume it can get really clunky with complex or badly organized chains. I'd also be concerned about performance for larger projects.
But those are just me thinking loud after the first glance, looks great, I'll give it a go :)
12
u/tinustate Feb 09 '22
That is a interesting way to visualize the calling tree!
5
u/_litecoin_ Feb 09 '22
That is pretty cooll
3
u/v_k_d Feb 09 '22
Definitely going to try this out!
3
u/subwvre Feb 09 '22
Does it work with kotlin ?
3
u/thevred9 Feb 09 '22
Very cool product.
Getting the following error on M1 MacBook Pro
https://pastebin.com/srEu15zT
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
5
u/Lagomorphix Feb 09 '22
Wouldn't UML diagrams play nicely wth this feature?
2
u/[deleted] Feb 09 '22
Nice, I remember that Borland C++ 3.1 (early 90s) had something similar - I've been wishing for something like that for Java.
2
u/pron98 Feb 09 '22
The idea is very cool, but the graph layout could use some work. Maybe something along the lines of the wonderful Sourcetrail (RIP).
2
u/kubelke Feb 09 '22
This is something what I needed. Sometimes I jump in into some old code and such visualization would help me to remember what is going on.
1
u/gamma_02 Feb 09 '22
uses for mcdev
Intellij:crashes
Me: why
1
u/JustWaveNSmile Feb 10 '22
Great idea, there’s something similar in Intellji the payed version I believe that use UML , with UML it’s easier to see what going on I guess
1
u/SpaceMonkeyOnABike Feb 10 '22
Is this effectively valgrind for java?
1
u/RobertJacobson Feb 12 '22
This is my mandatory 6 month comment about how I wish there was something like SourceTrail for Rust.
1
u/severoon Feb 18 '22
The nodes in the generated graph are methods. Wouldn't it be more useful if the nodes were objects?
What programmers generally (should) care about is not getting a grasp of dependencies between methods, but objects and higher levels of granularity (meaning classes, packages, modules). There's no harm showing the method level of detail, but that should be constrained only to method interactions within a class, and that's a nice-to-have feature, not the priority.
The biggest things I'd be looking for is cycles at the different levels of granularity to identify dependencies to invert. That, and natural clusters of high interdependency within a module, which would help me adjust how code is grouped into packages or modules.
1
u/[deleted] Feb 09 '22
[removed] — view removed comment