Metadata: Can we get the pre-processed version?

0 votes
asked May 13 in Wanted features by coxley (140 points)
edited May 13 by coxley

Some tooling I have around PlantUML assumes that the render diagram and the extracted metadata will be the same. Just realizing that includes (and other pre-processors) challenge that assumption.

I know it's documented (https://plantuml.com/command-line#e5zg2xi3sru7ka3pk5ks), but would it be possible to get the original diagram in the metadata? Specifically when rendering with -pipe.

Others should find this useful, too. If the processed diagram source is retrieved from an image, that's not as useful as the original source.  Especially if there were useful functions defined, etc.

Example diagram:

@startuml
!include <tupadr3/common>                       
!include <tupadr3/devicons/java>                                    

@enduml

Example metadata for it:

@startuml

hide stereotype
sprite $java [48x48/16] {
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000120000000000000000000
000000000000000000000000000080000000000000000000
0000000000000000000000000001B0000000000000000000
0000000000000000000000000005A0000000000000000000
000000000000000000000000000C70000000000000000000
000000000000000000000000006F10000000000000000000
00000000000000000000000005F700000000000000000000
0000000000000000000000006FB000000000000000000000
000000000000000000000009FB0001650000000000000000
0000000000000000000001CFA0018C200000000000000000
000000000000000000002DF9005E90000000000000000000
00000000000000000001DF8008F700000000000000000000
0000000000000000000BFB005FA000000000000000000000
0000000000000000001FF200CF3000000000000000000000
0000000000000000001FD000FF4000000000000000000000
0000000000000000000DE000EFB000000000000000000000
00000000000000000005F2008FF600000000000000000000
00000000000000000000AA001EFE00000000000000000000
000000000000000000000B4004FF40000000000000000000
0000000000000000000000A100BF20000000000000000000
00000000000000000000000400A900000011000000000000
00000000000000016730000001800000046CB10000000000
00000000000005BD30000000010000120000DC0000000000
0000000000001DFEA7765567889BCB7000008F1000000000
000000000000001468899988753200000000BE0000000000
000000000000000001000000000000000004F50000000000
0000000000000000C800000000024200004E500000000000
0000000000000000CFFDCBBBCEFFFC201881000000000000
00000000000000000268AAAAA86400003000000000000000
000000000000000000000000000000000000000000000000
000000000000000009A10000002410000000000000000000
00000000000000000CFFFEDDEFFFF6000000000000000000
00000000000003520049CEEFFCA720000000000000000000
000000000019B50000000000000000000002400000000000
0000000002FF820000000000000000000378000000000000
00000000018DFFDB9766555566789ACCA610160000000000
00000000000001357899AABAA9875310026AA10000000000
0000000000000003542211111233579BCB72000000000000
000000000000000002457778888765310000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
}

skinparam folderBackgroundColor<<DEV JAVA>> White

@enduml

1 Answer

+1 vote
answered May 14 by plantuml (230,840 points)
Well, the big question is whether you put the source before or after preprocessing.

Both have pros and cons.

If you put source before preprocessing and if you include some local file, you don't store info coming from those local files.

Since we were not able to choose, we put both in the last beta http://beta.plantuml.net/plantuml.jar :-)

Does it make sense ?
commented May 15 by Serge Wenger Work (13,280 points)

If no Preprocessing, only one and with preporocessing both is it OK for me.yes

commented May 16 by coxley (140 points)
Thanks for getting a beta out to test! This looks good, but could we get a better delimiter between the two diagrams than whitespace? Or do you recommend splitting on `@start` ?
...