How to integrate new symbol

0 votes
asked Jul 17, 2014 in Wanted features by cm2291 (160 points)
Hey everybody!

My question is, how do I integrate a new symbol in PlantUML? I use PlantUML via JQuery plugin to visualize my Database on a HTML Page. What I need is, to integrate the symbol "assembly" (UML 2.0 Standard) for a Server Client visualization.

I have already downloaded the JAVA Script of PlantUML, but I really don't have a clue, how to add this symbol.

Many thanks in advance,

cm2291

2 Answers

0 votes
answered Jul 17, 2014 by plantuml (298,440 points)

Hello,

Are you trying to do something like this:



@startuml
component comp1
component comp2
comp1 -0)- comp2
@enduml


It's not documented, but you can find information here:
http://plantuml.sourceforge.net/qa/?qa=1736/are-partial-lollipop-for-component-diagrams-supported

Tell us if this is not what you are expecting.

Regards,
 

commented Jul 17, 2014 by cm2291 (160 points)
That's exactly what I want! Is there an option to name the interface, except using ':'??
That would be an important information for my diagramms, because it's possible that my clients use different interfaces.
commented Jul 17, 2014 by plantuml (298,440 points)
Well, not for the moment.
You have to use ':' (which is somehow buggy), we never though about this.

@startuml
component comp1
component comp2
comp1 -0)- comp2 : foo with a bug
@enduml

But we are open here : what I suggest is that you send us (by mail, if you want, or in this thread) a graphical example of what you are expecting, and eventually a syntax suggestion.
commented Jul 17, 2014 by cm2291 (160 points)
Sounds great! I will send you an email tomorrow. Thanks for your help :)
commented Jul 18, 2014 by cm2291 (160 points)
After sleeping over it, my request has changed, it's ok for me to name the interfaces with ':', but it would be great, if I could group the symbols for more clients with the same interface.
What I mean is, that you have one server and minimum 2 clients using the same interface. What I want is, that there are not two "Server-Client-Symbols", but one, which directs to the clients.
Something like this: http://www.plantuml.com:80/plantuml/png/YmvEBIfBBOfLqDLLy7JZYdREoKpDAp44yJMG18nW0W00
commented Jul 18, 2014 by plantuml (298,440 points)
So you want this:
@startuml
[Server] - IF
IF )-- [Client1]
IF )-- [Client2]
@enduml

http://www.plantuml.com/plantuml/png/YmvEBIfBBOfLq5NmTEFoT5FGrDLLY7REoKpDAp6CHHCmYWK0

But maybe the drawing is not perfect for you ?
commented Jul 18, 2014 by cm2291 (160 points)
Yeah correct. I would prefer to use the '-0)-' drawing but only with minimum two clients, using the same IF. I'm thinking of something like that there is only one socket ')', from which lines go to the clients.
commented Jul 18, 2014 by plantuml (298,440 points)
Done with Paint, but something like that ?
https://dl.dropboxusercontent.com/u/13064071/IF001.png
(do not hesitate to use an image editor to show us what you are expecting)
commented Jul 18, 2014 by cm2291 (160 points)
Exactly, that would be so great.
0 votes
answered Jul 21, 2014 by plantuml (298,440 points)

We have created a beta version that draws interface slightly differently. You can download it here:

https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

@startuml
component server
component client1
component client2
server -- IF
IF )-- client1
IF )-- client2
@enduml

There are still some issues, especially with text overlapping, but feedback is welcome!

Thanks,

...