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

Build vs Buy a Data Quality Solution: Which is Best for You? Gain insights on a hybrid approach. Download white paper now!

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.

Build vs Buy a Data Quality Solution: Which is Best for You? Maintaining high quality data is essential for operational efficiency, meaningful analytics and good long-term customer relationships. But, when dealing with multiple sources of data, data quality becomes complex, so you need to know when you should build a custom data quality tools effort over canned solutions. Download our whitepaper for more insights into a hybrid approach.

Topics:
java ,java 9 ,eclipse

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}