Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface consumption socket #94

Closed
JirkaDellOro opened this issue Apr 5, 2019 · 15 comments
Closed

Interface consumption socket #94

JirkaDellOro opened this issue Apr 5, 2019 · 15 comments

Comments

@JirkaDellOro
Copy link

In the documentation, I find only the syntax for creating a lollipop to depict the implementation of an interface: foo --() bar
There is no description for the socket, depicting the consumption, which should be foo --( bar

However, the above example works, but not satisfactory. Instead of showing the socket with the name of the interface, as desired and as the lolli does, it draws a line to the definition of the interface such as a direct association all across the diagram.

It would be great if that could be changed or, maybe even better, having options for both the socket and the lolli

@arnaudroques
Copy link
Contributor

Support for lollipop is not complete nor well documented.

I'm not sure to understand what you want to draw, but you can try those examples:

@startuml
component foo1
component bar1
foo1 --() lolli
lolli )-- bar1
@enduml
@startuml
component foo1
component foo2
foo1 -0)- foo2
@enduml

Maybe it will help. If it does not, you may post a link to a simple graphical example of what you are expecting.

@JirkaDellOro
Copy link
Author

To clearify, please check this out:
http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuKhBp4bLSClFLwZcKb38p2j9BKfBJ4vLIClFvwg5I3eb5e4batCIYuiLaXABW6mWgQ2heGbMfW0Y5JHrGO90FGwfUIb0Wm40

Instead of reaching out of the box to connect to the interface, the socket should behave just like the lolly, displaying the name of the interface at the empty socket. Please compare to this: https://de.wikipedia.org/wiki/Schnittstelle_(UML)#/media/File:Interface-4.png

@arnaudroques
Copy link
Contributor

I think I've got the point. The most difficult part is to find a new syntax for this.
Any idea ?

@JirkaDellOro
Copy link
Author

I think the syntax is fine, the behavior isn't. Just make the socket behave like the lollipop, only that instead of the ball at the end it shows the arc.

@arnaudroques
Copy link
Contributor

Changing the behavior means changing all existing diagrams made by all other users.
So even if this is not widely documented, we have to think carefully about it before this move.

@JirkaDellOro
Copy link
Author

Ah, I think I unterstand. That's why you're suggesting a different syntax. How about

--((

That is still close to the lollipop, just one of the brackets reversed.

@arnaudroques
Copy link
Contributor

Ok. The work is not finished yet (you'll see that the drawing is not working in all case). But with last beta http://beta.plantuml.net/plantuml.jar you can now have:

@startuml
foo --(( bar
@enduml

We just want to be sure that we are on the right path. Does is sound good to you ? Thanks

@JirkaDellOro
Copy link
Author

Great, it's getting there. I tried it in the vscode-plugin. At this point, the socket is always opened downwards, Of course it should open in the direction of the connecting line.

Thank you for those quick replies and improvements

@arnaudroques
Copy link
Contributor

Of course it should open in the direction of the connecting line.

Sure, we're working on it :-)
Maybe it's better with new beta http://beta.plantuml.net/plantuml.jar
Tell us if you find issue (and post your non-working example here). Thanks!

@JirkaDellOro
Copy link
Author

Great, again!

When will this be released? I finally figured out how to use the server efficiently, so that I only need to store the text-files and implement a permanent link. Looking forward to use this new socket there too...

@JirkaDellOro
Copy link
Author

I think it's on the plantuml server, correct?

@arnaudroques
Copy link
Contributor

Yes, it is.

@joaocortes
Copy link

Does the current version of plantuml support this syntax? I am trying to parse

@startuml
component a
a --(( b
@enduml

which does not work with the current version. I was expecting to get the component a connected to an empty socket labeled b.

The closest thing that works is

@startuml
component a
a --( b
@enduml

, but the result is not the same because b is drawn as an interface symbol, not as an empty socket.

@joaocortes
Copy link

There is an open issue on this matter, #200

@The-Lum
Copy link
Collaborator

The-Lum commented Dec 11, 2023

Hi all,

Here is a possible workaround (using label) as:

@startuml
component XX
label "Required Interface" as bb
XX -( bb
@enduml

Enjoy,
Regards,
Th.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants