使用IntelliJ生成类图
如何让 IntelliJ 10.5(在 Mac 上)生成显示项目中所有类的类图?我确信我忽略了一些明显的事情,但我只能使用“显示图表”功能来一次显示一个类。 (我还想出了如何添加额外的类,但同样,一次只能添加一个类。)
How do I get IntelliJ 10.5 (on the Mac) to generate a class diagram showing all of the classes in my project? I'm sure I'm overlooking something obvious, but I can only get the "Show Diagram" feature to show one class at a time. (I also figured out how to add additional classes, but again, only one at a time.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
使用
图表
|从包的上下文菜单中显示图表...
。在项目根目录上调用它将显示模块依赖关系图。如果需要多个包,可以拖拽将它们拖放到第一个包的已打开图表中,然后按 e 将其展开。
注意:此功能在旗舰版中提供,在免费的社区版中不提供。
Use
Diagrams
|Show Diagram...
from the context menu of a package. Invoking it on the project root will show module dependencies diagram.If you need multiple packages, you can drag & drop them to the already opened diagram for the first package and press e to expand it.
Note: This feature is available in the Ultimate Edition, not the free Community Edition.
IntelliJ IDEA 14+
显示图表弹出窗口
右键单击类型/类/包>图表>显示图表弹出窗口...
或者
Ctrl+Alt+U
显示图表(打开新选项卡)
右键单击类型/类/包>图表>显示图表...
或者
Ctrl+Alt+Shift+U
默认情况下,您仅看到类/接口名称。如果您想查看更多详细信息,请转到文件>设置...>>工具>图表并检查您想要的内容(例如:字段、方法等)
PS:您需要 IntelliJ IDEA Ultimate,因为社区版不支持此功能。如果您转到文件>设置...>>插件,可以看到Community Edition中没有UML Support插件。
IntelliJ IDEA 14+
Show diagram popup
Right click on a type/class/package > Diagrams > Show Diagram Popup...
or
Ctrl+Alt+U
Show diagram (opens a new tab)
Right click on a type/class/package > Diagrams > Show Diagram...
or
Ctrl+Alt+Shift+U
By default, you see only the classes/interfaces names. If you want to see more details, go to File > Settings... > Tools > Diagrams and check what you want (E.g.: Fields, Methods, etc.)
P.S.: You need IntelliJ IDEA Ultimate, because this feature is not supported in Community Edition. If you go to File > Settings... > Plugins, you can see that there is not UML Support plugin in Community Edition.
您可以安装免费的 pugins 之一 - Code Iris。
PlantUML
IntelliJ IDEA 中的其他此类工具是付费的。
I chose a more powerful alternative:
In Netbeans - easyUML
In Eclipse - ObjectAid, Papyrus, Eclipse Modeling Tools
我希望它能帮助你。
You can install one of the free pugins - Code Iris.
PlantUML
Other tools of this type in the IntelliJ IDEA are paid.
I chose a more powerful alternative:
In Netbeans - easyUML
In Eclipse - ObjectAid, Papyrus, Eclipse Modeling Tools
I hope it will help you.
尝试 Ctrl+Alt+U
另外检查 UML 插件是否激活(设置 -> 插件,设置可以通过 打开Ctrl+Alt+S
Try Ctrl+Alt+U
Also check if the UML plugin is activated (settings -> plugin, settings can be opened by Ctrl+Alt+S
使用 Intellij 插件 Sketch It!。
Use Intellij plugin Sketch It!.
现在有一种官方方法可以添加“PlantUML 集成”插件到您的 JetBrains 产品。
安装步骤请参考:
https://stackoverflow.com/a/53387418/5320704
Now there is an official way to add "PlantUML integration" plugin to your JetBrains product.
Installation steps please refer:
https://stackoverflow.com/a/53387418/5320704
这个插件非常好:Sketch It!.
this plugin is really good: Sketch It!.