uml – How to Generate a Sequence Diagram from Java Source Code

uml – How to Generate a Sequence Diagram from Java Source Code

With Intellij 2019 there are two plugins can do this job:

  1. SequenceDiagram (currently 1.3).
    Go in your in Class method that you want to analyse and Tool>SequenceDiagram :
    enter

  2. ZenUML support (currently 2019.1.2)
    enter

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

uml – How to Generate a Sequence Diagram from Java Source Code

I have implemented a junit test based sequence generator which generates sequence diagrams for the pgf-umlsd latex package example:
Generated

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

Leave a Reply

Your email address will not be published.