Can I use '!include' statement in PlantUML?

hiroyuki takubo/田久保 宏行
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 21, 2023

Hi, can I use '!include' statement to include some plantuml files?

 

For example, I expect to get a diagram like this for file_c.puml on Confluence

(C)ClassC---(C)ClassB---(C)ClassA

 

I also expect all puml files are in the same Confluence Space.

 

file_a.puml

@startuml
class ClassA
@enduml

 

file_b.puml

@startuml
!include file_a.puml

class ClassB

ClassB - ClassA
@enduml

 

 file_c.puml

@startuml
!include file_b.puml

class ClassC

ClassC - ClassB
@enduml

 

1 answer

0 votes
hiroyuki takubo/田久保 宏行
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 27, 2023

I got installed this plugin by our admin, and now examining include* statements.

Results:

  • When writing !include {filename}.puml directly in plugin editor,  it works to refer attachment files in the same Confluence page
  • When writing !include {URL to attachment file} directly in plugin editor, it doesn't work because of permission problem(all our confluence Spaces are private)
  • When writing !include (filename).puml in an attachment file, it doesn't work to refer other attachment files
  • It seems !includesub doesn't work In any way

 

I hope:

  • !include (filename).puml written in an attachment file also can refer to the attachment files in the same Confluence page
    • It will be best if it can also refer attachment files in other pages with relative path (ex. !include ../parent_page/brothre_page/a.puml)
  • !includesub available

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events