From c992db275494b05627248cd741adac5d7c199603 Mon Sep 17 00:00:00 2001 From: Yuuta Liang Date: Tue, 28 Nov 2023 21:00:25 -0800 Subject: Add UML generator Signed-off-by: Yuuta Liang --- umlgen/src/main/resources/graph.ftl | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 umlgen/src/main/resources/graph.ftl (limited to 'umlgen/src/main/resources/graph.ftl') 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 = <{«${cls.tag()}»
${cls.name()}}>] + <#else> + ${cls.name()} [label = "${cls.name()}"] + + + + <#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=""] + + ${relation.from()} -> ${relation.to()} + + + + <#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()}"] + + ${assoc.from()} -> ${assoc.to()} + + +} \ No newline at end of file -- cgit v1.2.3