diff options
author | Yuuta Liang <yuutaw@student.cs.ubc.ca> | 2023-11-28 21:00:25 -0800 |
---|---|---|
committer | Yuuta Liang <yuutaw@student.cs.ubc.ca> | 2023-11-28 21:00:25 -0800 |
commit | c992db275494b05627248cd741adac5d7c199603 (patch) | |
tree | f259bb943512007cbc9b50ddf8013d6e3f8b9008 /umlgen/src/main/resources | |
parent | 1073af21305360bd33903c533cdac57e9f936294 (diff) | |
download | jca-c992db275494b05627248cd741adac5d7c199603.tar jca-c992db275494b05627248cd741adac5d7c199603.tar.gz jca-c992db275494b05627248cd741adac5d7c199603.tar.bz2 jca-c992db275494b05627248cd741adac5d7c199603.zip |
Add UML generator
Signed-off-by: Yuuta Liang <yuutaw@student.cs.ubc.ca>
Diffstat (limited to 'umlgen/src/main/resources')
-rw-r--r-- | umlgen/src/main/resources/graph.ftl | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/umlgen/src/main/resources/graph.ftl b/umlgen/src/main/resources/graph.ftl new file mode 100644 index 0000000..759fc44 --- /dev/null +++ b/umlgen/src/main/resources/graph.ftl @@ -0,0 +1,37 @@ +digraph { + node [ + shape=record + style=filled + fillcolor=gray95 + ] + + <#list classes as cls> + <#if cls.tag()??> + ${cls.name()} [label = <{<b>«${cls.tag()}»</b><br />${cls.name()}}>] + <#else> + ${cls.name()} [label = "${cls.name()}"] + </#if> + </#list> + + <#if extends??> + <#list extends as relation> + <#if relation.impl()> + edge [dir=forward arrowtail=empty arrowhead=empty style="dashed"] + <#else> + edge [dir=forward arrowtail=empty arrowhead=empty style=""] + </#if> + ${relation.from()} -> ${relation.to()} + </#list> + </#if> + + <#if assocs??> + <#list assocs as assoc> + <#if assoc.partOf()> + edge [dir=both arrowtail=odiamond arrowhead=vee style="" headlabel="${assoc.head()}"] + <#else> + edge [dir=forward arrowtail=empty arrowhead=vee style="" headlabel="${assoc.head()}"] + </#if> + ${assoc.from()} -> ${assoc.to()} + </#list> + </#if> +}
\ No newline at end of file |