您好,欢迎访问一九零五行业门户网

关于PhpStorm中如何绘画UML的解析

phpstorm中绘画umlide支持phpstorm
在plugins中 安装plantuml integration插件
到http://www.graphviz.org/网站下载graphviz.exe并安装(这个软件可以支持更多的uml语法)
将graphviz安装目录下的dot.exe路径添加到plantuml的设置中
文档文档地址:http://plantuml.com/
建议使用活动图-activity-bate语法:活动图activity-beta(https://plantuml.com/zh/activity-diagram-beta)
活动图(新语法)
当前活动图(activity diagram)的语法有诸多限制和缺点,比如代码难以维护。所以从v7947开始提出一种全新的、更好的语法格式和软件实现供用户使用(beta版)。就像序列图一样,新的软件实现的另一个优点是它不再依赖与graphviz。
新的语法将会替换旧的语法。然而考虑到兼容性,旧的语法仍被能够使用以确保向前兼容。
但是我们鼓励用户使用新的语法格式。
语法基础@startuml、@enduml
开始、结束标记,表示uml解析的部分
start、end
表示图示的开始和结束。图示的开始和结束。
:hello world;
活动标签(activity label)以冒号开始,以分号结束。活动默认安装它们定义的顺序就行连接。
if、then、else和elseif
设置分支测试。标注文字则放在括号中。
repeat、repeatwhile 重复循环。
while和endwhile进行while循环。还可以在关键字endwhile后添加标注,还有一种方式是使用关键字is。
fork,fork again和end fork表示并行处理。
note、end note、floating note left 等等表示注释,例如:
floating note left: this is a note:foo2;note right  this note is on several  //lines// and can  contain <b>html</b>  ====  * calling the method foo() is prohibitedend note
#hotpin:activity;、#aaaaaa:ending of the process; 表示颜色
使用->标记,你可以给箭头添加文字或者修改箭头颜色。dotted, dashed, bold or hidden arrows 和颜色标记,例如-[#blue]->
通过定义分区(partition),你可以把多个活动组合(group)在一起。通过定义分区(partition),你可以把多个活动组合(group)在一起。例如:
partition initialization {    :read config file;    :init internal variable;}
使用管道符|来定义泳道。还可以改变泳道的颜色。
|swimlane1|start:foo1;|#antiquewhite|swimlane2|:foo2;:foo3;|swimlane1|:foo4;|swimlane2|:foo5;stop
关键字detach移除箭头。
通过修改活动标签最后的分号分隔符(;),可以为活动设置不同的形状。|、<、>、/、]、}
:next(o)|:receiving;split :nak(i)< :ack(o)>split again :ack(i)< :next(o) on several line| :i := i + 1] :ack(o)>split again :err(i)< :nak(o)>split again :foo/split again :i > 5}stopend split:finish;
一个例子@startumlstartif (is login?) then (y)    if (gived box?) then (y)        :illegal request;        detach    else (n)        :release box;        :get boxoid;    endifelse (n)    if (has boxoid?) then (n)        :illegal request;        detach    endifendif:check wechat broswer;if (wechat broswer?) then (y)    if (get openid from cookie?) then (y)        if (get userinfo from db by openid?) then (n)            :clear openid in cookie;            :re-request url;            detach        endif    else (n)        :location wechat auth;        detach    endifendif:receive chocolate;end@enduml
更多phpstorm技术文章,请访问phpstorm教程栏目!
以上就是关于phpstorm中如何绘画uml的解析的详细内容。
其它类似信息

推荐信息