How to draw edges between list items? [message #1849340] |
Thu, 13 January 2022 03:31  |
Eclipse User |
|
|
|
Hi,
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.
Thanks!
|
|
|
Re: How to draw edges between list items? [message #1849471 is a reply to message #1849340] |
Thu, 20 January 2022 18:43  |
Eclipse User |
|
|
|
Hi Konrad,
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 [1], 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[2].
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.
Best regards,
Steve
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=455056
[2] https://www.eclipse.org/sirius/doc/developer/extensions-provide_custom_style.html
|
|
|
Powered by
FUDForum. Page generated in 0.04104 seconds