Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Visualizing Java 9 Module Relationships

DZone's Guide to

Visualizing Java 9 Module Relationships

Check out this awesome plug-in for Eclipse Neon that visualizes the connections between the various Java 9 Jigsaw modules.

· Java Zone
Free Resource

The single app analytics solutions to take your web and mobile apps to the next level.  Try today!  Brought to you in partnership with CA Technologies

As I stated in an earlier post, I’ve been running Eclipse Neon on the Java 9 + Jigsaw builds for a little while and haven’t had any issues. I spent a few hours over the weekend tinkering with some modularity tool ideas. I wrote a little plug-in for Eclipse Neon that visualizes the connections between the various modules.

modules1













The implementation is a little rough right now as I was focused on just sorting out how to get the various bits of technology to work. The Modules Dependencies View updates whenever the user highlights a Java project (e.g. in the Package Explorer, Project Explorer, or Navigator): it queries the Java runtime associated with the project for its list of modules and readability associations between them, and then uses Eclipse GEF Zest to visualize the results.

The part where I query the Java runtime is a huge hack right now, but the good news is that in playing with the visualization, I may have sorted out a better less hacky way of getting this done. More on this later.

I’m also just relearning how to use Zest (not that I was ever much of an expert with it), so there’s probably more that I can do with the layout algorithm. One thing that I did do was make it so that you can drill down into any single module with a double-click.

modules2













While I was at it, I threw together a quick tree view that lets you drill down through the reads relationships between modules.

moduleTree














It’s all very ugly of course, but it’s been pretty helpful for me see all the parts. I need to test this with a custom jimage (perhaps I’ll build one based on one of the compact profiles).

It would also be cool to include full build path of the Java project (e.g. workspace contents and JAR files) in the visualization. I also completely disregarded layers and should probably put some thought into representing them.

I haven’t pushed out the code yet; it will appear in Eclipse Labs when it’s a little more fully-baked.

Note that JDK 9 is going to slip a bit: with less than two weeks to go before the “feature complete” deadline, a proposal has been put forward to extend the release date by six months.

CA App Experience Analytics, a whole new level of visibility. Learn more. Brought to you in partnership with CA Technologies.

Topics:
java ,java 9 ,eclipse

Published at DZone with permission of Wayne Beaton, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}