Is there any command line tool which takes Java source and generates sequence diagrams? Or are there any tools that convert Java code to XML and convert the XML to sequence diagrams in any of the standard image format using open api ? i know some tools which generate sequence diagrams from text description such as uml graph. is there any way to convert java code to text description format.so that i can use the available tools.
Asked
Active
Viewed 1.6k times
10
-
Seems like converting to XML would be an unnecessary step. – Dave Newton Nov 22 '11 at 06:21
-
then how can i generate the diagrams – pavan Nov 22 '11 at 06:22
-
http://stackoverflow.com/questions/87137/sequence-diagram-reverse-engineering – prunge Nov 22 '11 at 06:24
-
1Specifically from source, not inside Eclipse, and free? I don't know of any. There are a few free tools that will generate sequence diagrams from actual program flow. The source-level ones pretty much all use the Eclipse AST and live as Eclipse plugins. – Dave Newton Nov 22 '11 at 06:24
-
1yes there is UMLet plugins which is open source to generate sequence diagrams. But I think it does not generate it from the source code. You can see the detail from here http://www.umlet.com/ – Naved Nov 22 '11 at 06:30
-
1IBM Rational Software Architect http://www.ibm.com/developerworks/rational/library/08/0610_xu-wood/ – Raihan Nov 22 '11 at 09:57
1 Answers
4
Quick Sequence Diagram Editor works off simple text files.
Perhaps you could use this in combination with Eclipse:
- Highlight a method name in your editor window
- Right-Click, select "Open Call Hierarchy"
- In the "Call Hierarchy" window which opens, expand the stack path elements you want
- Select the top-level stack element
- Right-Click, select "Copy Expanded Hierarchy"
- Paste into a text editor of your choice (Vi, Nano, Notepad++, etc)
- Use some text conversion / regex utility to convert to Quick Sequence Diagram Editor text format.

Stewart
- 17,616
- 8
- 52
- 80
-
As far as #7 goes.. are there any utilities that actually support this? – captainrad Oct 31 '15 at 22:20
-
I used the search / replace function of `Vi`, which supports fairly complex regex. Other options might be `sed`, `awk` or other Unix power tools. – Stewart Nov 01 '15 at 02:25