Skip to content

Commit

Permalink
support all PlantUML elements - fix sequence diagrams
Browse files Browse the repository at this point in the history
- Timmy/plantuml-action@v1 uses sometimes an older plantuml-1.2023.7.jar version and not the latest version
  • Loading branch information
kirchsth committed Feb 10, 2024
1 parent c3f3f0c commit 2ef536e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
12 changes: 6 additions & 6 deletions C4_Sequence.puml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ $calcDescr
$getParticipant("external_person", $alias, $label, $type, $descr, $sprite, $tags, $link)
!endprocedure

!unquoted procedure System($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="")
!unquoted procedure System($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="", $plant="rectangle")
' $type reuses $techn definition of $tags
$getParticipant("system", $alias, $label, $type, $descr, $sprite, $tags, $link)
!endprocedure
Expand All @@ -247,7 +247,7 @@ $calcDescr
$getParticipant("system", $alias, $label, $type, $descr, $sprite, $tags, $link)
!endprocedure

!unquoted procedure System_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="")
!unquoted procedure System_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="", $plant="rectangle")
' $type reuses $techn definition of $tags
$getParticipant("external_system", $alias, $label, $type, $descr, $sprite, $tags, $link)
!endprocedure
Expand All @@ -264,7 +264,7 @@ $calcDescr



!unquoted procedure Container($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!unquoted procedure Container($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $plant="rectangle")
$getParticipant("container", $alias, $label, $techn, $descr, $sprite, $tags, $link)
!endprocedure

Expand All @@ -276,7 +276,7 @@ $calcDescr
$getParticipant("container", $alias, $label, $techn, $descr, $sprite, $tags, $link)
!endprocedure

!unquoted procedure Container_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!unquoted procedure Container_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $plant="rectangle")
$getParticipant("external_container", $alias, $label, $techn, $descr, $sprite, $tags, $link)
!endprocedure

Expand All @@ -290,7 +290,7 @@ $calcDescr



!unquoted procedure Component($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!unquoted procedure Component($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $plant="rectangle")
$getParticipant("component", $alias, $label, $techn, $descr, $sprite, $tags, $link)
!endprocedure

Expand All @@ -302,7 +302,7 @@ $calcDescr
$getParticipant("component", $alias, $label, $techn, $descr, $sprite, $tags, $link)
!endprocedure

!unquoted procedure Component_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!unquoted procedure Component_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $plant="rectangle")
$getParticipant("external_component", $alias, $label, $techn, $descr, $sprite, $tags, $link)
!endprocedure

Expand Down
14 changes: 8 additions & 6 deletions percy/TestAllPlantUmlElements.puml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
@startuml
@startuml

' If ENABLE_ALL_PLANT_ELEMENTS is set BEFORE the first C4_* file is loaded,
' nearly "all" PlantUML elements can be used like
' Component(StorageA, "Storage A ", $plant="storage")
!ENABLE_ALL_PLANT_ELEMENTS = 1

!theme C4_united from <C4/themes>
' !theme C4_green from <C4/themes>

' convert it with additional command line argument -DRELATIVE_INCLUDE="./.." to use locally
!if %variable_exists("RELATIVE_INCLUDE")
!include %get_variable_value("RELATIVE_INCLUDE")/C4_Component.puml
' percy runs (sometimes) with 1.2023.7
' !theme C4_united from %get_variable_value("RELATIVE_INCLUDE")/themes
!theme C4_united from ./../themes
' !theme C4_green from ./../themes
!include ./../C4_Component.puml
!else
!theme C4_united from https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/themes
' !theme C4_green from https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/themes
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
!endif


LAYOUT_TOP_DOWN()

' default is rectangle
Expand Down

0 comments on commit 2ef536e

Please sign in to comment.