-
Hi all, the available examples do not show how to implement ports for the nodes of a graph diagram? I have already implemented the frontend part (using SPort in Sprotty). However, my backend part concerning the Eclipse GLSP server is not yet working properly. For instance, I managed to have each node with one default 'dummy' port upon creation of the node. But, it is not yet possible to connect the edges to the ports and/or have ports created automatically upon edge creation, etc. Is there any example for ports or can you please provide some guidance or documentation on that? I also create the issue #264 asking for examples/documentation on this. Thank you very much in advance. original thread by Armin Moin |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi Armin, |
Beta Was this translation helpful? Give feedback.
-
[Armin Moin] Hi Philip, Thanks a lot for your explanation. |
Beta Was this translation helpful? Give feedback.
Hi Armin,
for the automatic creation of ports when creating a connection you need to implement that functionality in the correspondingly configured CreateEdgeOperationHandler implementation.
To allow directly connecting edges to ports, you probably need to configure them as valid edge targets in your diagram configuration with
EdgeHints
.Unfortunately, I don't think that there is a public example for this, but I've seen ports being supported in closed-source projects. If you have an example working, feel free to let us know so that we can add it somewhere as documentation. Thanks!