PlantUML 是绘制 uml 的一个开源项目
2017年1月2日小于 1 分钟
PlantUML
PlantUML 是绘制 uml 的一个开源项目.
支持快速绘制:
时序图
用例图
类图
活动图 (here is the legacy syntax)
组件图
状态图
对象图
部署图
Timing diagram
同时还支持以下非UML图:
Wireframe graphical interface
架构图
Specification and Description Language (SDL)
Ditaa diagram
甘特图
Mathematic with AsciiMath or JLaTeXMath notation
Example
- 原始文本
Bob->Alice : hello
- 效果
┌───┐ ┌─────┐
│Bob│ │Alice│
└─┬─┘ └──┬──┘
│ hello │
│──────────────>│
┌─┴─┐ ┌──┴──┐
│Bob│ │Alice│
└───┘ └─────┘
Integration
Graphviz 安装
PlantUML 是依赖于 Graphviz 的
MAC 安装
$ brew install graphviz
Idea
VSCode
- Install PlantUML 插件
直接安装插件
编辑内容如下:
@startuml
Bob -> Alice : Hello, how are you
Alice -> Bob : Fine, thank you, and you?
@enduml
使用 Alt+D 直接开启预览

贡献者
binbin.hou