IDEA 安装PlantUML

利用Eclipse中的Green插件,也可以进行UML的绘制。Green是live round-tripping编辑器,也就是说它支持软件工程和逆向工程技术。您可以使用它创建一个UML类图,或生成代码。

uml_class_demo.puml


@startuml

abstract class AbstractList
abstract AbstractCollection
interface List
interface Collection

interface IPerson

class User{
{field} - private A field
..
{field} # protected A field
{field} ~ default A field
==
{field} + public A field
{static} String static field
--
{method} Some method()
{abstract} abstract methods()
}
note top: node text
note top of User
  In java, every class
  extends
  this one.
end note


class Teacher
class Address
class Air
class Hourse
class Tv
class Door
class Bed
class Door2
class Door3


Hourse o-- Bed
IPerson <|.. User

Address <– User

Address ..> Air

User –> Hourse

User <|–- Teacher


Hourse o– Door
Hourse o–- Door2
Hourse o–- Door3
Hourse "1" *–- "*" Tv : contains


class Foo {
  int size()
}
Foo *- Element


List <|-- AbstractList
Collection <|-- AbstractCollection

Collection <|- List
AbstractCollection <|- AbstractList
AbstractList <|-- ArrayList

class ArrayList {
Object[] elementData
size()
}

enum TimeUnit {
DAYS
HOURS
MINUTES
}




@enduml

scale 生成图片倍数
默认的,字段和方法是由PlantUML自动分组的,你也可以使用: – .. == __这些分隔符手动进行分组
up、down、left、right定义线的起始方位。
PlantUML用下面的符号来表示类之间的关系:
Extension(扩展)
依赖,Dependency:<..
关联,Association:<–
组合,Composition:*–
聚合,Aggregation:o–
实现,Realization:<|..
泛化,Generalization:<|–
关联关系又可以细化为聚合关系和组合关系


uml_sque.puml

@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

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

uml_case_demo.puml

@startuml
/':Main Admin: as Admin
(Use the application) as (Use)

User -> (Start)
User --> (Use)

Admin ---> (Use)

note right of Admin : This is an example.

note right of (Use)
A note can also
be on several lines
end note

note "This note is connected\nto several objects." as N2
(Start) .. N2
N2 .. (Use)'/

start
:"步骤1处理";
:"步骤2处理";
if ("条件1判断") then (true)
    :条件1成立时执行的动作;
    if ("分支条件2判断") then (no)
        :"条件2不成立时执行的动作";
    elseif (condition B) then (yes)
        :"fasfsdf";
    else
        if ("条件3判断") then (yes)
            :"条件3成立时的动作";
        else (no)
            :"条件3不成立时的动作";
        endif
    endif
    :"顺序步骤3处理";
endif

if ("条件4判断") then (yes)
:"条件4成立的动作";
elseif()
    if ("条件5判断") then (yes)
        :"条件5成立时的动作";
    elseif (no)
        :"条件5不成立时的动作";
    endif
endif
stop
@enduml

https://blog.csdn.net/tterminator/article/details/78177619

IDEA使用PlantUML构建类图,时序图等
使用PlantUML快速绘图
http://plantuml.com/zh/class-diagram

https://www.cnblogs.com/cxzdy/p/3781097.html

你可能感兴趣的:(IDEA 安装PlantUML)