欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Eclipse UML pugin --- PlantUML使用方法

程序员文章站 2022-07-15 16:19:10
...

       工作中需要画时序图,baidu一下找了一个PlantUML,用起来比较方便。总结如下:

一、安装

打开 Eclipse,Help-> Install new software...。

填入相应的 URL:

http://basar.idi.ntnu.no/svn/tdt4100/anonymous/trunk/updatesite/

http://plantuml.sourceforge.net/updatesite/

 

或者把附件的6个jar包copy到<<eclipse>>\plugins\ 目录下

<<eclipse>>为Eclipse安装路径

 

重启 Eclipse。会在 Windows->Show View->Other 看到 PlantUML 的图标。

 

二、使用

1. 时序图

在eclipse中新建一个文本文件txt。按照如下格式书写:

@startuml 

 title My Sequence Diagram

participant Test1 as t1

participant Test2 as t2

 

t1->t2:action()

 

 @enduml

 

详细请参考

http://www.ibm.com/developerworks/cn/opensource/os-cn-ecl-plantuml/