Find dependency chain between two classes on Intellij IDEA diagram

Alf*_*gon 5 java diagram dependencies uml intellij-idea

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.

jon*_*bot 1

因此,我找到了一种方法来做到这一点,至少在显示层次结构中类之间的连接方面。

\n\n

首先,我使用编辑器选项卡之一上的“向右移动”并排打开这两个类(请参阅拆分和取消拆分编辑器选项卡)

\n\n

其次,我通过按住 Alt + Shift 并在每个类名上拖动鼠标来选择两个类名(这会触发多个光标功能)

\n\n

第三,我按下键盘快捷键以 UML 图的形式查看类层次结构(在我的 Mac 上为 \xe2\x8c\xa5\xe2\x87\xa7\xe2\x8c\x98U)。

\n\n

然后,您可以点击 UML 编辑器中的“显示依赖关系”按钮来获取两个目标类的完整依赖关系视图。

\n\n

这是在 IntelliJ IDEA 2017.1 中。

\n