没有合适的资源?快使用搜索试试~ 我知道了~
PlantUML_Language_Reference_Guide_en 介绍了使用 PlantUML绘制各种示意图,PlantUML 是您绘制 分工图、头脑风暴图、用例图、时序图等的好工具 PlantUML是一个开源的UML图绘制工具,它允许用户通过纯文本描述来创建UML图形。这种方式不仅提高了绘图的效率,还便于将图形描述与源代码一起存储在版本控制系统中
资源推荐
资源详情
资源评论
Drawing UML with PlantUML
PlantUML Language Reference Guide
(Version 1.2023.11)
PlantUML is a component that allows to quickly write :
• Sequence diagram
• Usecase diagram
• Class diagram
• Object diagram
• Activity diagram
• Component diagram
• Deployment diagram
• State diagram
• Timing diagram
The following non-UML diagrams are also supported:
• JSON Data
• YAML Data
• Network diagram (nwdiag)
• Wireframe graphical interface
• Archimate diagram
• Specication and Description Language (SDL)
• Ditaa diagram
• Gantt diagram
• MindMap diagram
• Work Breakdown Structure diagram
• Mathematic with AsciiMath or JLaTeXMath notation
• Entity Relationship diagram
Diagrams are dened using a simple and intuitive language.
1 SEQUENCE DIAGRAM
1 Sequence Diagram
Creating sequence diagrams with PlantUML is remarkably straightforward. This ease of use is largely
attributed to the user-friendly nature of its syntax, designed to be both intuitive and easy to remember.
• Intuitive Syntax:
First and foremost, users appreciate the straightforward and intuitive syntax that PlantUML employs.
This well-thought-out design means that even those new to diagram creation nd it easy to grasp the
basics quickly and without hassle.
• Text-to-Graphic Correlation:
Another distinguishing feature is the close resemblance between the textual representation and the graph-
ical output. This harmonious correlation ensures that the textual drafts translate quite accurately into
graphical diagrams, providing a cohesive and predictable design experience without unpleasant surprises
in the nal output.
• Ecient Crafting Process:
The strong correlation between the text and the graphical result not only simplies the crafting process
but also signicantly speeds it up. Users benet from a more streamlined process with fewer requirements
for time-consuming revisions and adjustments.
• Visualization While Drafting:
The ability to envisage the nal graphical outcome while drafting the text is a feature that many nd
invaluable. It naturally fosters a smooth transition from initial draft to nal presentation, enhancing
productivity and reducing the likelihood of errors.
• Easy Edits and Revisions:
Importantly, editing existing diagrams is a hassle-free process. Since the diagrams are generated from
text, users nd that making adjustments is considerably easier and more precise than altering an image
using graphical tools. It boils down to simply modifying the text, a process far more straightforward and
less prone to errors than making changes through a graphical interface with a mouse.
PlantUML facilitates a straightforward and user-friendly approach to creating and editing sequence dia-
grams, meeting the needs of both novices and seasoned designers alike. It skillfully leverages the simplicity
of textual inputs to craft visually descriptive and accurate diagrams, thereby establishing itself as a must-
have tool in the diagram creation toolkit.
You can learn more about some of the common commands in PlantUML to enhance your diagram creation
experience.
1.1 Basic Examples
In PlantUML sequence diagrams, the -> sequence denotes a message sent between two participants, which
are automatically recognized and do not need to be declared beforehand.
Utilize dotted arrows by employing the --> sequence, oering a distinct visualization in your diagrams.
To improve readability without aecting the visual representation, use reverse arrows like <- or <--.
However, be aware that this is specically for sequence diagrams and the rules dier for other diagram
types.
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml
PlantUML Language Reference Guide (1.2023.11) 1 / 550
1.2 Declaring participant 1 SEQUENCE DIAGRAM
1.2 Declaring participant
If the keyword participant is used to declare a participant, more control on that participant is possible.
The order of declaration will be the (default) order of display.
Using these other keywords to declare participants will change the shape of the participant represen-
tation:
• actor
• boundary
• control
• entity
• database
• collections
• queue
@startuml
participant Participant as Foo
actor Actor as Foo1
boundary Boundary as Foo2
control Control as Foo3
entity Entity as Foo4
database Database as Foo5
collections Collections as Foo6
queue Queue as Foo7
Foo -> Foo1 : To actor
Foo -> Foo2 : To boundary
Foo -> Foo3 : To control
Foo -> Foo4 : To entity
Foo -> Foo5 : To database
Foo -> Foo6 : To collections
Foo -> Foo7: To queue
@enduml
PlantUML Language Reference Guide (1.2023.11) 2 / 550
1.2 Declaring participant 1 SEQUENCE DIAGRAM
Rename a participant using the as keyword.
You can also change the background color of actor or participant.
@startuml
actor Bob #red
' The only difference between actor
'and participant is the drawing
participant Alice
participant "I have a really\nlong name" as L #99FF99
/' You can also declare:
participant L as "I have a really\nlong name" #99FF99
'/
Alice->Bob: Authentication Request
Bob->Alice: Authentication Response
Bob->L: Log transaction
@enduml
You can use the order keyword to customize the display order of participants.
@startuml
participant Last order 30
participant Middle order 20
participant First order 10
PlantUML Language Reference Guide (1.2023.11) 3 / 550
1.3 Declaring participant on multiline 1 SEQUENCE DIAGRAM
@enduml
1.3 Declaring participant on multiline
You can declare participant on multi-line.
@startuml
participant Participant [
=Title
----
""SubTitle""
]
participant Bob
Participant -> Bob
@enduml
[Ref. QA-15232]
1.4 Use non-letters in participants
You can use quotes to dene participants. And you can use the as keyword to give an alias to those
participants.
@startuml
Alice -> "Bob()" : Hello
"Bob()" -> "This is very\nlong" as Long
' You can also declare:
' "Bob()" -> Long as "This is very\nlong"
Long --> "Bob()" : ok
@enduml
PlantUML Language Reference Guide (1.2023.11) 4 / 550
剩余550页未读,继续阅读
资源评论
RockTec
- 粉丝: 176
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功