Setting up Plant UML on Windows with Atom

PlantUML is a nice tool to create UML diagrams in a markup style way.
In this guide I’ll show you how to set it up for Atom on Windows, whereas the steps are quite similar on Linux or Mac. I think it’s a powerful tool that lets you draw your diagrams quickly.

Table of Contents

  1. What’s PlantUML?
  2. Requirements
  3. Atom Packages and Settings
  4. Resources

What’s PlantUML?

PlantUML helps to quickly and easily create UML diagrams using simple and intuitive language. It is opensource and free. A markup like description of the diagram can be converted to a graphical diagram as shown below


Requirements

To create and view your UML diagrams in Atom you first need to install a few things:

(for Linux and Mac just check how to install Graphviz and Java Runtime Enivronment, the plantUML jar is the same for every plattform)

plantUML jar

The jar file can be downloaded here. Then you just have to save it to a place of your liking, I’ve saved it to my users folder. Be sure to remember where you saved it.

Graphviz

The installation exe for Graphviz can be found here. Just install it following the wizard, no need to add it to PATH, and again remember the install location.

Java Runtime Enivronment

To run plantUML we also need a Java Runtime Environment. If not already installed we can get the latest version at https://www.java.com/en/download/

Atom Packages and Settings

Now in Atom we need to install these two packages:

Then in the settings of plantuml-preview we need to set the location for the Graphviz dot executable and the plantUML.jar. From the install locations we remembered from before we set the dot location to Graphviz_install_location/bin/dot.exe and the jar to jar_location/plantUML.jar.


Now we can toggle the preview with ctrl/cmd + alt + P. To save the diagram as either png or svg just uncheck the use of the temp directory and reload the preview, then the image will be saved in the same directory.

Resources