A useful combo for using the IntelliJ Sequence Diagram plugin to generate sequence diagrams and then handing off to an online editor.

Use the right tools at the right time

The sequence diagram plugin is the best way to stay within Intellij to generate the first cut. Then you can use a better editor to refine the content you wish to share with your colleagues. Sometimes you just want something to do the grunt work, which you can refine later. For example, I have a new idea for something, but it’s quicker to use existing code to create the high level components in Intellij. To start with, I can use the popular IntelliJ Sequence Diagram plugin.

Use the code to generate the first cut

Here I’m illustrating a concept from the AWS DynamoDBLocal libraries to a colleague using the Intellij Sequence Plugin. Later I’ll use https://sequencediagram.org to add notes, and remove superfluous classes to make my point clearer.

The problem is, I want to show some, but not all of the AWS operations to my colleague. However the sequence diagram plugin can generated quite ‘noisy’ output initially.

I want better control over the sequence diagram from my code. I don’t want every single low level detail, and I want to be able to add notes where needed, change class names in the diagram etc.

Export the diagram to a PlantUML

Luckily, as well as generating images for export, it can also export to PlantUML, which is a format used by the popular sequencediagram.org website.

With that PlantUML file saved off to my file system, I have a template I can then load it into https://sequencediagram.org/ and change my diagram to suit my needs.

Edit the UML with a nice editor

This original diagram has a lot going on:


But now it’s in PlantUml format on SequenceDiagram, it’s easy to modify. See how I’ve added a note, and deleted irrelevant classes, all through a nice GUI. Nice to get the code to do the heavy lifting!

Conclusion

I hope this helped you speed up your day. I have more productivity hacks on the website – you can start at this page if you like. Also, please feel free to leave some comments below – what are your productivity wins? And what things do you still struggle with day to day?

By James