So I used Zest and reworked the demo PDE bundle hierarchy visualization view to be a type hierarchy visualization view.
In particular, the project I'm working on now has a split hierarchy of interfaces with a base class that implements none of them but subclasses that implement one or more. Here's a screen shot of the hierarchy in both views.
Type Hierarchy View + Graph Type Hierarchy View |
This view gives me not only the ancestor and descendant types for the type focused, but also all ancestor types and implemented interfaces for anything displayed. To get the same information about interfaces implemented using the Type Hierarchy view, I would need to focus on multiple types and look at both the normal and inverted hierarchies.
I've also been doing some work learning GEF lately, so here are some more hierarchies visualized. I had the shape and logic examples in my workspace at the time, so the extensions from those also show up.
org.eclipse.draw2d.Border hierarchy |
org.eclipse.gef.NodeEditPart hierarchy |
I find the built-in Type Hierarchy view sufficient for most purposes, but sometimes it just falls short. The graph view fills in the gaps for me.
As for hacking on it, I can post the code if anyone is interested in it for use or further development/refinement, which it certainly could use. It does not tie in to the IDE, so you currently have to manually focus on an element and cannot open the editor from a type displayed. I planned to also have the sash with the list of fields and methods for the selected type within the view, but that is not there yet. It doesn't remember any history, either. It still has a few bugs I'm sure, too, but it's in a working-enough state to be helpful.
Very cool! This would be a fabulous add-on to JDT!
ReplyDeleteReally great! I'd love to be able to use this as part of Eclipse JDT.
ReplyDelete@paul do you still have the code for Type Hierarchy viewer? If so can you pls share the code.
ReplyDeleteUntil there is a better way to distribute, I've simply posted the files here:
ReplyDeletehttp://bilnoski.net/files/net.bilnoski.pde.visualization-source-v1.0.5.zip
http://bilnoski.net/files/net.bilnoski.pde.visualization_1.0.5.201010281700.jar
My changes to the original PDE Visualization code are minimal, but whatever is mine should be considered EPL.
The jar can be placed in the eclipse/dropins/ directory, then just open the view.
Thanks for sharing the code. Will post back if I do something useful :)
ReplyDelete