plantuml as code comment

0 votes
asked Jan 17 in Wanted features by d0uub (220 points)
i can draw @startuml between @enduml at my java or js code.

however, is it possible i can use plantuml fully replace source code comment? for example:

//start

//:initiaize;

var a=1;

var b=2;

//  var c=3; not in plantuml because "//" after with space

//:run the logic;

a=b;

//end

convert as follow to generate plantuml

start

:initiaize;

:run the logic;

end

3 Answers

0 votes
answered Jan 18 by d0uub (220 points)
 
Best answer

i got solution you answer several years ago.. thx

http://forum.plantuml.net/1525/%40pauseuml-for-splitting-uml-code

0 votes
answered Jan 17 by plantuml (198,780 points)

Not sure that this is exactly what you are looking for, but you can use @pause / @unpause to pause and resume PlantUML text diagram.

For example:

// @startuml
// start
// :initiaize;
// @pause
var a=1;
var b=2;
//  var c=3; not in plantuml because "//" after with space
// @unpause
// :run the logic;
// @pause
a=b;
// @unpause
// end
// @enduml

Does is help ?

commented Jan 17 by d0uub (220 points)
i want to do this:
https://www.dropbox.com/s/6znbirherofgrp0/code-comment.png?dl=0

however i have to write a script to do this.
i wonder if there have something like filter to read only beginning of line with "//" (for example) and remove it before generate chart?
0 votes
answered Jan 17 by d0uub (220 points)

i want to do this:
https://www.dropbox.com/s/6znbirherofgrp0/code-comment.png?dl=0

however i have to write a script to do this.
i wonder if there have something like filter to read only beginning of line with "//" (for example) and remove it before generate chart?

...