Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to draw edges between list items?
How to draw edges between list items? [message #1849340] Thu, 13 January 2022 08:31 Go to next message
Konrad Jünemann is currently offline Konrad JünemannFriend
Messages: 93
Registered: December 2018
Member
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 23:43 Go to previous message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 570
Registered: May 2011
Senior Member
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


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Programmatically Create Modeling Project Issues
Next Topic:Deploy Sirius project to an Eclipse RCP application (or other)
Goto Forum:
  


Current Time: Mon Jun 05 15:59:59 GMT 2023

Powered by FUDForum. Page generated in 0.02425 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top