Fundamentals 6 min read

How to Install and Use PlantUML in IntelliJ IDEA for Quick Diagramming

This guide explains what PlantUML is, why it’s useful for fast diagram creation, how to install the required Graphviz engine, set up the PlantUML plugin in IntelliJ IDEA, create UML files, and includes sample code for sequence diagrams and role definitions.

Liangxu Linux
Liangxu Linux
Liangxu Linux
How to Install and Use PlantUML in IntelliJ IDEA for Quick Diagramming

PlantUML is an open‑source textual language that lets you create a variety of UML and non‑UML diagrams (sequence, use‑case, class, activity, component, state, object, deployment, Gantt, architecture, etc.) quickly and export them as PNG or SVG.

Advantages

All‑text editing, no drag‑and‑drop controls.

Platform‑independent – any system with the PlantUML JAR can generate diagrams.

Integrates with many editors and IDEs, including IntelliJ IDEA.

Prerequisite: Graphviz

PlantUML relies on Graphviz for rendering. Install Graphviz from the official site (or a trusted package manager) before using PlantUML; otherwise diagrams will not display.

Installing the PlantUML plugin in IntelliJ IDEA

Open File → Settings → Plugins .

Search for PlantUML and click Install (PlantUML Integration).

Restart IDEA.

For offline installation, download the plugin zip from

http://plugins.jetbrains.com/plugin/7017-plantuml-integration

and install it via the Install Plugin from Disk option.

Creating a PlantUML file

Choose File → New → PlantUML File and select the diagram type you want to create.

Sample PlantUML script

@startuml
skinparam rectangle {
  BackgroundColor DarkSeaGreen
  FontStyle Bold
  FontColor DarkGreen
}
:User: as u
rectangle Tool as t
rectangle "Knowledge Base" as kb
(Robot Framework) as rf
(DUT) as dut
note as ts
  - Execute test script,
  - Respond using knowledge base,
  - Follow public account: Java后端
end note
note as act
  - Query &
  - Action
end note
note as kb_cmt
  - Determine response method,
  - Fill message from context,
  - Save info to context
end note
u --> rf
rf --> ts
ts --> t
kb <-> act
act --> t
t = dut
t_cmt -- t
kb_cmt -left- kb
@enduml

Sequence diagram example

@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Bob <-- Alice: another authentication Response
@enduml

Defining roles in a sequence diagram

@startuml
actor Foo1
boundary Foo2
control Foo3
entity Foo4
database Foo5
collections Foo6
Foo1 -> Foo2: To boundary
Foo1 -> Foo3: To control
Foo1 -> Foo4: To entity
Foo1 -> Foo5: To database
Foo1 -> Foo6: To collections
@enduml

Exporting diagrams

After the diagram renders in IDEA, you can export it as PNG, SVG, or other formats via the PlantUML tool window.

Alternative: Chrome PlantUML Viewer

If you prefer not to install Graphviz, you can use the Chrome extension "PlantUML Viewer" to edit PlantUML text and view diagrams directly in the browser.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

PlantUMLUMLIntelliJ IDEADiagrammingTutorialGraphviz
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.