PlantUML中的Sintax错误

时间:2018-03-22 07:58:44

标签: plantuml

我有PlantUML代码:

@startuml
hide methods
hide stereotypes

!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
!define Enum(name,desc) class name as "desc" << (E,#FFFFAA) >>
!define primary_key(x) <b>x</b>
!define not_null(x) <u>x</u>
!define unique(x) <color:green>x</color>

Enum(menuitemtype,"Menu item types") {
    category
    text
    sticker
    user_action
}

Table(menuitem,"Menu item") {
    primary_key(id) INTEGER
    not_null(unique(name)) VARCHAR[32]
    type INTEGER
    anonymous BOOLEAN
    parent INTEGER
    type INTEGER
}

Table(chat,"Telegramm chats") {
    primary_key(id) INTEGER
    not_null(unique(chat_id)) INTEGER
    is_group BOOLEAN
}

Table(requester,"Bot requester") {
    primary_key(id) INTEGER
    not_null(unique(tele_id)) INTEGER
    is_boot BOOLEAN
    user_name VARCHAR[32]
    last_name VARCHAR[32]
    first_name VARCHAR[32]
    is_active BOOLEAN
    last_access DATETIME
}

menuitem -- menuitemtype
menuitem "0..N" --> "1" menuitem
requester "1" --> "N" chat

@enduml

我从这里获取代码:https://gist.github.com/QuantumGhost/0955a45383a0b6c0bc24f9654b3cb561

当NetBeans的PlantUML插件实际显示结构时:

enter image description here

使用apt-get在Ubuntu 16上安装的java工具/usr/share/plantuml/plantuml.jar会出现以下错误:

$ cat SystemDB/schema.puml | plantuml -syntax -v
(0.000 - 119 Mo) 117 Mo - PlantUML Version 8024
(0.048 - 119 Mo) 115 Mo - GraphicsEnvironment.isHeadless() false
ERROR
5
Syntax Error?

并生成关注文件

enter image description here

根据http://plantuml.com/PlantUML_Language_Reference_Guide.pdf - 第1.21章

,我看到刻板印象很方便

0 个答案:

没有答案