Is there a keyword for fixing the distance between lifetime lines in sequence diagram?

0 votes
asked Mar 27, 2013 in Wanted features by anonymous
Hello,

Cosider the below example:

@startuml

A->B:very long long long message name

@enduml

Is there any keyword that can fix the distance between the two lifetime of the A and B regardless the length of the message between them itself?

If there is no keyword can it be added as a new feature?

Thanks in advance

1 Answer

0 votes
answered Mar 27, 2013 by plantuml (295,000 points)

What you can do, is to add \n to break the lenght of your message:

A->B:very long long long \n message name

Is it ok for you ?

commented Mar 27, 2013 by anonymous
I know the '\n' trick but I propose the below:
make a keyword for fixed distance between lifetime lines and always write the message name in one line and it doesn't matter if the text of the message name was written on other liftime lines, by this way it will be better laying out things automatically rather than trying to place '\n' in many locations and see what will be the shape of the UML ;)
commented Mar 27, 2013 by plantuml (295,000 points)
Ok, what about a skinparam:

skinparam maxMessageSize 400

The setting will be global for the whole diagram.
(The system will detect spaces in message to place appropriate line break)

Sound fine?
commented Mar 27, 2013 by anonymous
Sound great but is it a new keyword as I tried it but it didn't work :(
commented Mar 27, 2013 by plantuml (295,000 points)
Well, it has not been implemented yet!
You have to wait until this will be done.
A message will be posted here when this will be ready.
commented Mar 28, 2013 by plantuml (295,000 points)
You can download a beta version here:
http://dl.dropbox.com/u/13064071/plantuml.jar

It supports this:

@startuml
skinparam maxMessageSize 80
A->B:very long long long message name
@enduml

Hope it helps...
commented Mar 28, 2013 by anonymous
Thank you for your fast reaction :)
I had notice that this beta version always put '\n' in the place of the space inside the message name regardless the width,
I suggest doing '\n' just after the exceeded width regardless the character inside the message name itself, by this the message shape will be consistent and the overall uml shape will be shorter ;)
commented Mar 28, 2013 by plantuml (295,000 points)
So, you can try a new version
http://dl.dropbox.com/u/13064071/plantuml.jar

Putting a negative number will do what you are looking for:

@startuml
skinparam maxMessageSize -80
A->B:very long long long message name
@enduml

We would like to provide the choice for the user of which way to use, but
we do not like the idea of providing a negative value.
So idea about a better syntax is welcome!

Regards,
commented Mar 28, 2013 by anonymous
I found this update very useful :)
I suggest using the character '@' or '>' ;)
commented Apr 18, 2013 by anonymous
Is the new release which contains this keyword is ready for download ?
commented Apr 18, 2013 by plantuml (295,000 points)
Yes, this works in V7963
...