Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 496744

Summary: Inconsistent GMF location after region insertion
Product: [Modeling] Sirius Reporter: Laurent Redor <laurent.redor>
Component: DiagramAssignee: Laurent Redor <laurent.redor>
Status: CLOSED FIXED QA Contact: Julien Dupont <julien.dupont>
Severity: normal    
Priority: P3 CC: julien.dupont, laurent.fasani, pierre-charles.david
Version: 3.1.0Keywords: triaged
Target Milestone: 4.1.0   
Hardware: PC   
OS: Windows 10   
See Also: https://git.eclipse.org/r/75934
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=9809db17095bc93475f818679ff2d632ca914293
Whiteboard:
Bug Depends on:    
Bug Blocks: 497404, 499829    
Attachments:
Description Flags
sampleProjectFor496744.zip none

Description Laurent Redor CLA 2016-06-24 11:23:34 EDT
The computed GMF size is not correct in case of a new semantic element that creates a region at the refresh. It should be the default container dimension. It is not really correct, but it is better than the current dimension computed from the location of
the next region (for wrong reason).
Comment 1 Eclipse Genie CLA 2016-06-24 11:26:20 EDT
New Gerrit change created: https://git.eclipse.org/r/75934
Comment 2 Laurent Redor CLA 2016-06-24 11:37:01 EDT
This problem is visible if you launch the test CompartmentsCreationTest.testAddSemanticElementInHorizontalStack from https://git.eclipse.org/r/#/c/75608

The above gerrit fixes the problem.
Comment 3 Laurent Fasani CLA 2016-07-01 04:00:42 EDT
please could you provide a test scenario?
Comment 5 Laurent Redor CLA 2016-07-06 10:54:32 EDT
Created attachment 262942 [details]
sampleProjectFor496744.zip

Steps to reproduce for validation:
* Import project "Compartments" from sampleProjectFor496744.zip
* Open diagram VStackDiag
* Open My.ecore with the "Sample Ecore Model Editor"
* Add a new class, named "Left_class2", just after "Left_class1" in "P1"
* Save the ecore file
* Go to the diagram VStackDiag, it was refreshed and the new "Left_class2" class is visible.
* Save the session
* Open the aird in a text editor, and search the GMF location of the class "Center_class2".
* The y location should be 131 (and not 182).
Comment 6 Pierre-Charles David CLA 2016-10-18 11:07:53 EDT
Available in Sirius 4.1.0, see https://wiki.eclipse.org/Sirius/4.1.0 for details.