Bug 521932 - Possible wrong border node GMF coordinates after arrange all
Summary: Possible wrong border node GMF coordinates after arrange all
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 5.0.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-09-06 09:44 EDT by Florian Barbin CLA
Modified: 2017-09-06 12:35 EDT (History)
1 user (show)

See Also:


Attachments
Use case to reproduce this issue (80.40 KB, application/zip)
2017-09-06 09:44 EDT, Florian Barbin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Barbin CLA 2017-09-06 09:44:36 EDT
Created attachment 270097 [details]
Use case to reproduce this issue

With the attached project,
* Open the UseCase3 representation
* Perform an arrange all
* The border node C121 should be at the south location and its GMF coordinates are not consistent. (To check the GMF coordinates, install the Sirius Debug View)
Comment 1 Florian Barbin CLA 2017-09-06 09:53:06 EDT
Analysis:
* The problem is from org.eclipse.sirius.diagram.ui.graphical.edit.policies.SpecificBorderItemSelectionEditPolicy.getNewBounds(ChangeBoundsRequest) method.

This method uses DBorderItemLocator to compute the border node valid location. But in the case of an arrange all, the parent figure size is not yet computed and can be different at the end of the arrange all.

As the border node location has already been computed by using the CanonicalDBorderItemLocator, we should add a metadata in the ChangeBoundsRequest to do not use the DBorerItemLocator in SpecificBorderItemSelectionEditPolicy.getMoveCommand
Comment 2 Florian Barbin CLA 2017-09-06 10:02:04 EDT
Bug detected during the 520624
Comment 3 Eclipse Genie CLA 2017-09-06 10:55:15 EDT
New Gerrit change created: https://git.eclipse.org/r/104470
Comment 4 Florian Barbin CLA 2017-09-06 10:57:08 EDT
TODO: revert the gerrit once this bug is fixed.