如何从现有的Java代码生成UML图(特别是序列图)?


当前回答

我注意到Intellij的SequenceDiagram插件也是一个不错的选择。

其他回答

我推荐PlantUML。这个工具非常有用,很容易使用。PlantUML有一个Netbeans插件,你可以用你的java代码创建UML图。

在netbeans中安装PlantUML插件的方法如下:

Netbeans菜单->工具->插件

现在选择可用插件,然后找到PlantUML并安装它。

更多信息请访问网站:www.plantuml.com

我是作者之一,所以答案可能有偏见。它是开源的(Apache 2.0),但是插件不是免费的。如果你克隆并在本地构建它,你就不需要付费。

在Intellij IDEA上,ZenUML可以从Java代码生成序列图。

请登录https://plugins.jetbrains.com/plugin/12437-zenuml-support查看

源代码:https://github.com/ZenUml/jetbrains-zenuml

我注意到Intellij的SequenceDiagram插件也是一个不错的选择。

您可以使用Eclipse 3.5的EclipseUML的30天评估版本:http://www.uml2.org/eclipse-java-galileo-SR2-win32_eclipseUML2.2_package_may2010.zip 这不是最新的3.6版本,但是非常好,并且不需要您购买它来进行测试和逆向工程。

反向工程:http://www.forum-omondo.com/documentation_eclipseuml_2008/reverse/reverse/reverse_engineering_example.html

现场flash演示:http://www.ejb3.org/reverse.swf

EclipseUML Omondo是世界上最好的Java工具。在这个实时java同步市场上,似乎只有eUML可以与之竞争,但是eUML在代码中添加了模型标签,这真的非常非常糟糕,对我来说是一个绝对的失败。

你的代码库是什么?Java还是c++ ?

eUML2 for Java is a powerful UML modeler designed for Java developper in Eclipse. The free edition can be used for commercial use. It supports the following features: CVS and Team Support Designed for large project with multiple and customizable model views Helios Compliant Real-time code/model synchronization UML2.1 compliant and support of OMG XMI JDK 1.4 and 1.5 support The commercial edition provides: Advanced reversed engineering Powerful true dependency analyze tools UML Profile and MDD Database tools Customizable template support