Please provide a way to select !include blocks based on an "identifier" instead of it's number

+1 vote
asked Apr 30, 2016 in Closed feature request by anonymous

I found PlantUML very usefull to document my code for an open source project. I use !include a lot to get information about interfaces/abstract classes in separate cpp/h files. Is it somehow possible to access the @startuml/@enduml block within an included file by an identifier instead of it's number?
When inserting a new diagram in a h-file I have to adjust all the numbers in file where I !include that h-file.

example:

file1:

@startuml
ID=TAG1
...
@enduml

@startuml
ID=TAG2
...
@enduml

file2:

@startuml
!include file1!TAG2
...
@enduml

1 Answer

+1 vote
answered Apr 30, 2016 by plantuml (294,960 points)
selected Jul 7, 2018 by Anthony-Gaudino
 
Best answer

With last beta: https://dl.dropboxusercontent.com/u/13064071/plantuml.jar you can have:

@startuml
!include big.h!TAG2
Alice->Bob : hello
@enduml

Assuming that big.h file contains:

@startuml(id=TAG1)
Alice->Bob : TAG1
@enduml

@startuml(id=TAG2)
Alice->Bob : TAG2
@enduml

Tell us if it's working for you!

commented May 1, 2016 by anonymous
thanks a lot for that very quick answer! works for me for the first tries!
...