Bug 543946 - Edges between contained elements disapear when horizontally stacked containers are moved
Summary: Edges between contained elements disapear when horizontally stacked container...
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 6.1.1   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2019-01-29 10:41 EST by Neil Mackenzie CLA
Modified: 2023-08-23 10:06 EDT (History)
5 users (show)

See Also:


Attachments
containerWithHorizontalStack (12.92 KB, image/png)
2019-01-29 10:41 EST, Neil Mackenzie CLA
no flags Details
container with horizontal stack after moving container (12.42 KB, image/png)
2019-01-29 10:42 EST, Neil Mackenzie CLA
no flags Details
container with freee form presentation (16.72 KB, image/png)
2019-01-29 10:42 EST, Neil Mackenzie CLA
no flags Details
container with free form presentation after moving (21.61 KB, image/png)
2019-01-29 10:43 EST, Neil Mackenzie CLA
no flags Details
model_and_specification_plugins (49.39 KB, application/x-zip-compressed)
2019-01-29 10:43 EST, Neil Mackenzie CLA
no flags Details
sirius1 (18.97 KB, image/png)
2019-01-30 05:19 EST, Neil Mackenzie CLA
no flags Details
sirius2 (22.32 KB, image/png)
2019-01-30 05:20 EST, Neil Mackenzie CLA
no flags Details
sirius3 (17.31 KB, image/png)
2019-01-30 05:20 EST, Neil Mackenzie CLA
no flags Details
sirius4 (14.55 KB, image/png)
2019-01-30 05:21 EST, Neil Mackenzie CLA
no flags Details
sirius5 (13.51 KB, image/png)
2019-01-30 05:21 EST, Neil Mackenzie CLA
no flags Details
model and edit and editor plugins (150.31 KB, application/x-zip-compressed)
2019-02-04 10:47 EST, Neil Mackenzie CLA
no flags Details
Bug reproduced using the basic family example. (18.86 KB, application/x-zip-compressed)
2020-03-10 07:09 EDT, Alexandra Tritean CLA
no flags Details
Edges expectation (14.49 KB, image/png)
2020-03-10 07:16 EDT, Alexandra Tritean CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Mackenzie CLA 2019-01-29 10:41:15 EST
Created attachment 277360 [details]
containerWithHorizontalStack

In a Sirius specification, when a container has children's presentation marked as 'horizontal stack' and then there is an edge relation between items in a sub-container of this container, the edges display very neatly, even with very large diagrams.

However when a container is moved on screen many of the edges just disappear. This problem does not occur when I choose 'free form' for the children's presentation (unfortunately I need a horizontal stack)

I have attached images here, based on a simple model where a TablesSet contains some tables, a Table contains Columns, and the Columns can have a dependency on Columns from another table. Model and .odesign specification is attached also, with example instance.

If this is a bug I am happy to raise a bug report and if pointed to some code, I can help to investigate also.

The images attached are:
1.) nicely laid out container with children presentation set as 'horizontal stack'
2.) screenshot after moving this container (edges disappear)
3.) nicely laid out container with children presentation as 'free form'
4.) screenshot after moving this container (edges do not disappear)

I am using the eclipse modelling package from the December 2018 release which uses Sirius 6.1.1.

This issue is discussed in forum post https://www.eclipse.org/forums/index.php/t/1097301/

I would like to get this fixed quickly, but don't have any money to pay for sponsorship.
Also, I would like to learn to compile Sirius because I am keen to contribute in the push to Sirius on the web.

If on the bug report someone could point me to roughly where that layout code lives I can help investigate and contribute to the fix.

I have previously been a contributer to EMFStore and EMF Client Platform projects.
Comment 1 Neil Mackenzie CLA 2019-01-29 10:42:13 EST
Created attachment 277361 [details]
container with horizontal stack after moving container
Comment 2 Neil Mackenzie CLA 2019-01-29 10:42:47 EST
Created attachment 277362 [details]
container with freee form presentation
Comment 3 Neil Mackenzie CLA 2019-01-29 10:43:16 EST
Created attachment 277363 [details]
container with free form presentation after moving
Comment 4 Neil Mackenzie CLA 2019-01-29 10:43:45 EST
Created attachment 277364 [details]
model_and_specification_plugins
Comment 5 Maxime Porhel CLA 2019-01-29 11:10:26 EST
Hi Neil, 


This figure composition and hierarchy of those compartments is not very simple. 
As you move the source of the edges, your issue might come from the layout of the source figures after the move, the border/insets/location of one of the moved figure might have slightly changed causing some source anchor (or reference point) to be out of the visible area / client area of the source figure. This leads GMF/Draw2D do see the source element as invisible and so it chose to not draw the edges (as if some scroll have been introduced in the figure). 

You might find entry points in org.eclipse.sirius.diagram.ui plugin: 

org.eclipse.sirius.diagram.ui.graphical.edit.policies.RegionContainerResizableEditPolicy
org.eclipse.sirius.diagram.ui.graphical.edit.policies.RegionContainerResizableEditPolicy
org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeContainerEditPart
org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusContainerDropPolicy


Regards, 

Maxime
Comment 6 Neil Mackenzie CLA 2019-01-30 05:19:32 EST
Thanks Maxim,
I will look further into the code.
I found one more way to describe when the problem happens.
I have attached 5 pictures here (sirius1, sirius2, sirius3, sirius4, sirius5).
These pictures are taken in order when moving table2 from right to left.
I have put a blue circle on the connection points.
We can see that as the table2 is moved left, the connection point gets higher up the vertical side of table2. Just after it reaches the top is when it disappears. Maybe the connection points don’t like to be on the horizontal side for some reason.
Comment 7 Neil Mackenzie CLA 2019-01-30 05:19:58 EST
Created attachment 277371 [details]
sirius1
Comment 8 Neil Mackenzie CLA 2019-01-30 05:20:18 EST
Created attachment 277372 [details]
sirius2
Comment 9 Neil Mackenzie CLA 2019-01-30 05:20:55 EST
Created attachment 277373 [details]
sirius3
Comment 10 Neil Mackenzie CLA 2019-01-30 05:21:34 EST
Created attachment 277374 [details]
sirius4
Comment 11 Neil Mackenzie CLA 2019-01-30 05:21:53 EST
Created attachment 277375 [details]
sirius5
Comment 12 Neil Mackenzie CLA 2019-01-30 06:18:59 EST
Another very interesting part of this bug is as follows:
when the edges have disappeared already, then right-clicking on table2 and choosing  "layout->all' shows all the edges correctly displayed for 1 second and then they disappear again.
This seems strange because it shows that the edges can be calculated correctly, and there has been no movement in this case to cause a change of insets or layouts or sizes or connection point.
Comment 13 Laurent Fasani CLA 2019-02-04 09:34:19 EST
Thanks for submitting this bug.

Before investigating we need at least a detailed scenario and data to reproduce. You gave a lot of information but yet it is difficult to reproduce

I tried to create a modeling project based on your metamodel but the editor plugin is unavailable so I had to edit the example model in text mode.
Comment 14 Neil Mackenzie CLA 2019-02-04 10:47:10 EST
Created attachment 277424 [details]
model and edit and editor plugins
Comment 15 Neil Mackenzie CLA 2019-02-04 10:54:05 EST
Thanks for your feedback Laurent.
I have attached the edit and editor plugins now.
when I open the example instance provided (under the model directory of the stacked_container_realtion_edges_bug_design plugin) and right-click on the TableSet and choose 'new representation', and choose new TableSet representation, then  I see a neat diagram of 2 tables with edges between columns. when I move table2 the edges disappear.

Let me know if there is anything else I can provide to help to reproduce the problem. 
Thanks,
 Neil
Comment 16 Alexandra Tritean CLA 2020-03-10 07:09:19 EDT
Created attachment 282069 [details]
Bug reproduced using the basic family example.

Bug reproduced using the basic family example.
Comment 17 Alexandra Tritean CLA 2020-03-10 07:16:29 EDT
Created attachment 282070 [details]
Edges expectation
Comment 18 Alexandra Tritean CLA 2020-03-10 07:20:00 EDT
Hello, 

I have encountered the same problem in my representation, the only difference being the fact that I'm using 'vertical stack'. 

To make the things easier for you, I attached a very dummy representation created based on the sample family example where the bug is reproducible.
In the attached picture 'Edges expectation' is what I'm expecting to see based on the way in which the representation is defined, but you will see that by changing the position of the containers (Isa/Paul), the edges will not be visible anymore.

Is there any chance you are considering to solve this in the near future?

Thank you!

Kind Regards, 

Alexandra
Comment 19 Maxime Porhel CLA 2020-03-12 08:47:43 EDT
Hi, 

Thanks for the additional reproduction data. 

Please note that the issue has been added to roadmap of a future release yet. 

Regards;
Comment 20 Qiran Cong CLA 2020-08-12 01:59:26 EDT
Hi, want to know when will this bug be fixed
Comment 21 Alexandra Tritean CLA 2021-01-20 05:51:02 EST
Hello, 

Are there any news in regards to this issue? 

Thank you!

Kind Regards, 
Alexandra
Comment 22 Elena Larina CLA 2023-08-23 10:06:58 EDT
Hello, 

I have face this bug too. When container have the vertical stack.