Reputation: 5929
I'm trying to find an automatic way of getting from here:
To here:
Without having to manually add classes B and C. I've tried using the find dependencies action when right clicking on class A, but it only shows direct dependencies and if class A has lots of dependencies it's hard to know what "branch" to follow to find class D.
Upvotes: 5
Views: 2079
Reputation: 2453
So, I found a way to do this, at least in terms of displaying the connections between the classes in the hierarchy.
First, I opened the two classes alongside each other using the "move right" on one of the editor tabs (see Splitting and Unsplitting Editor tabs.
Second, I selected both class names by holding Alt + Shift and dragging my mouse across each class name (which triggers the multiple cursors feature.
Third, I hit the keyboard shortcut to view the class hierarchy as a UML diagram (⌥⇧⌘U on my Mac).
You can then hit the "Show Dependencies" button in the UML editor to get the full dependency view around your two target classes.
This was in IntelliJ IDEA 2017.1.
Upvotes: 1