|How to draw edges between list items? [message #1849340]
||Thu, 13 January 2022 08:31
| Konrad Jünemann
Registered: December 2018
I would like a create a diagram with Sirius that visualizes foreign key relations between attributes of some database tables. It should look similar to this.
That means that tables should be represented as lists of fields where edges can be created between individual fields.
How can I achieve this with Sirius?
- I tried creating list containers for the tables and sub nodes for the fields, but it seems you cannot create edges between sub nodes of list containers.
- Then I tried to make the container a region container with vertical stacking, which contains individual list-containers of 1 field each, but there is much space left between those list containers (i guess because of the label?) and furthermore edges then only connect to the bottom and top of the list containers, but not to the sides, which is what I would prefer.
Surely I am doing something wrong? This seems to me to be a pretty common requirement.
|Re: How to draw edges between list items? [message #1849471 is a reply to message #1849340]
||Thu, 20 January 2022 23:43
Unfortunately, this is a limitation that we still have, node in a list containers can't be source or target. Well you can specify an edge mapping using a node mapping that is displayed in a list container but the edges on the diagram will not be computed and drawn. There is a bugzilla about this enhancement , but it is quite old as you can see so I do not know when or if we will implement it. It is not on any roadmap that I know of, unless someone order it (wink wink). More seriously, there is a specification in the bugzilla that could give you some pointer if you want to implement it with some custom edit parts.
You probably have some alternative with less custom code by having your edge mapping source/target to the container mapping and compute some custom anchor (style need custom edit parts but just for the containers).
Otherwise, you can have border nodes on the mapping and force there position (custom code again) next to the list element and hide the border nodes with a filter.
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
Powered by FUDForum
. Page generated in 0.02425 seconds