可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I have a question about generating sequence diagram from Java source code. When I googled I saw someone told to use visual paradigm (VP), but it does not generate sequence diagram for me. Some steps in my VP are different from manual. The manual says to choose method but my VP does not allow to select method in a special class. Reverse Engineering Sequence Diagram from Java Source Code
Does anyone have a new idea to generate sequence diagram from Java source code?
回答1:
With Intellij 15.0.4:
just few seconds, install the plugin SequenceDiagram (currently 1.1).
Go in your in Class method that you want to analyse and Tool>SequenceDiagram :
回答2:
If you are using or wish to use the Eclipse IDE then you can install the ObjectAid UML plugin that can reverse engineer from:
- Java Stack Trace Console
- Java Stack Frames from Debug View
- Methods Call from Call Hierarchy View
and MUCH more.
See http://www.objectaid.com/sequence-diagram
回答3:
I have implemented a junit test based sequence generator which generates sequence diagrams for the pgf-umlsd latex package example:
Hello world
@Test
@SequenceDiagram({ Controller.class, Model.class })
public void testMethod() {
Controller c = new Controller(new Model());
c.init();
c.simpleBeanOperation();
}
https://github.com/sherif181/java-sequence-diagram-generator
回答4:
try this tool, This tool helps you to create the Java source code to Sequence and class diagram, including the execution time of each flow.
follow the steps as given in the documentation
http://maintainj.com/
回答5:
I used Umlgraph which is free see http://www.umlgraph.org/
But I mostly use it to generate class diagram in Javadoc.
To generate sequence diagram, you have to write many lines in your source file.
See http://www.umlgraph.org/doc/dns.html.
You will have to install Graphviz to make it work.
回答6:
UML-VP could generate sequence diagrams, pretty well. Based on your description, I feel you chose the package directory for presenting the source files to the tool. I have faced similar problem. The solution is to choose the "src" folder above the package folder, and then you can see some pretty nice diagrams flying out. Good Luck.
回答7:
Another good tool that generates sequence diagrams from Java programs is JIVE: www.cse.buffalo.edu/jive
It is available as a plug-in for Eclipse and is a free download. Also supports visualization of multi-threaded Java programs.
Note: JIVE generates the diagram for the execution of the program. It also generates object diagrams, and has other useful features such as query-based debugging. Sorry if this is not what you had in mind.
回答8:
There are many products that can generate sequence diagrams from Java source code. Unfortunately, all of the good ones cost a lot of money.
If you are using the community edition of Visual Paradigm, it does not allow you to generate any diagrams. You must upgrade to one of the paid versions.
You can compare the paid vs the free edition here
http://www.visual-paradigm.com/product/vpuml/features/?edition=ce
You need to buy standard edition of Visual Paradigm that support Code engineering.
Check out some of these links for alternative programs which also can generate diagrams / source code.
Posiden UML http://www.gentleware.com
Argo UML http://argouml.tigris.org
Other Resources
How can I generate sequence diagrams from Java source code?
Sequence Diagram Reverse Engineering
http://www.altova.com/umodel/sequence-diagrams.html
回答9:
I tried a lot of options today to generate Sequence and class diagrams from my existing code using IntelliJ Idea community edition, Below is the Solution which worked for me finally:
Specific versions of Intellij community edition only was compatible with the required plugins to make this work.
so its very important to download the right versions of IDE and plugins to make it work.
Here are the links to the complete set of softwares with specific versions which worked for me, pls note i tested these on my Mac Book Pro:
- [IntelliJ Community Edition IDE]
Code Iris for creating class diagrams and visualizing the code
SequenceDiagram Plugin for generating Seq Diagram on IntelliJ
IDE.
回答10:
The unable to select operation when performing reverse engineering of Java source code to sequence diagram in VP probably caused by selecting the wrong source folder. As long as you select the root folder of your source (according to the "package" statement of your class) it should then works. BTW, Visual Paradigm offer the subscription license which allow user to subscribe the license in monthly basis and in a relative low cost.