You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by jo...@apache.org on 2021/09/12 05:29:52 UTC

[isis] 01/04: ISIS-2846 link tree diagram / further clean up

This is an automated email from the ASF dual-hosted git repository.

joergrade pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git

commit fa9defedb226a7409a213d30178c2a658371b2cc
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Fri Sep 10 13:07:56 2021 +0200

    ISIS-2846 link tree diagram / further clean up
---
 .../apache/isis/client/kroviz/ui/diagram/PumlCode.kt   | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/PumlCode.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/PumlCode.kt
index ebc57e6..dc99777 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/PumlCode.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/PumlCode.kt
@@ -35,7 +35,7 @@ class PumlCode() {
     }
 
     fun addStereotype(s: String): PumlCode {
-        var result = "<<" + s + ">>"
+        var result = "<<$s>>"
         result = italic(result)
         result = center(result)
         code += result + NL
@@ -43,39 +43,39 @@ class PumlCode() {
     }
 
     fun addLink(url: String, title: String): PumlCode {
-        var result = "[[" + url + " "+ title + "]]"
+        var result = "[[$url $title]]"
         result = bold(result)
         code += result + NL
         return this
     }
 
     fun addClass(s: String): PumlCode {
-        val result = underline("(C) "+ s)
+        val result = underline("(C) $s")
         code += result + NL
         return this
     }
 
     fun toMindmap(): PumlCode {
-        code += "@startmindmap$NL" + code + "@endmindmap$NL"
+        code += "@startmindmap$NL$code@endmindmap$NL"
         return this
     }
 
     fun toMindmapNode(level:Int): PumlCode {
         val depth = "*".repeat(level)
-        code = depth + ":" + code + ";" + NL
+        code = "$depth:$code;$NL"
         return this
     }
 
     private fun center(s: String): String {
-        return ".." + s + ".."
+        return "..$s.."
     }
 
     private fun italic(s: String): String {
-        return "//" + s + "//"
+        return "//$s//"
     }
 
     private fun bold(s: String): String {
-        return "**" + s + "**"
+        return "**$s**"
     }
 
     private fun underline(s: String): String {
@@ -83,7 +83,7 @@ class PumlCode() {
     }
 
     fun addHorizontalLine(): PumlCode {
-        code += "----" + NL
+        code += "----$NL"
         return this
     }