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

Bug 519327

Summary: A bug in GMF NodeFigure sometimes causes snapToGrid problem
Product: [Modeling] Ecoretools Reporter: Laurent Redor <laurent.redor>
Component: GeneralAssignee: Project Inbox <ecore-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cedric.brun
Version: unspecified   
Target Milestone: 3.4.0   
Hardware: PC   
OS: Windows NT   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=519305
https://git.eclipse.org/r/100852
https://git.eclipse.org/c/ecoretools/org.eclipse.ecoretools.git/commit/?id=1bcf14e139d8a0673f588cc2fc969a18c2947bdb
Whiteboard:

Description Laurent Redor CLA 2017-07-06 11:08:27 EDT
According to GMF bug 519250, a workaround has been done in Sirius (bug 519305). As said in release notes [1], similar fix must be done in EcoreTools as in DNodeListEditPartWithAlpha, the class TransparencyFigure inherits from DefaultSizeNodeFigure.

[1] https://git.eclipse.org/r/#/c/95878/4/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
Comment 1 Eclipse Genie CLA 2017-07-06 11:16:38 EDT
New Gerrit change created: https://git.eclipse.org/r/100852
Comment 2 Laurent Redor CLA 2017-07-06 11:18:53 EDT
The gerrit https://git.eclipse.org/r/100852 is a proposition of fix (it must be merged when https://git.eclipse.org/r/#/c/95878 will be merged on Sirius side).
Comment 3 Cedric Brun CLA 2017-07-12 08:22:05 EDT
Hi and thanks for your patchset. Is that something which is only going to be integrated for Sirius 5.1 ?  If so I might postpone the integration of the fix until Sirius 5.1 would be the lowest version supported and I was planning to keep the Sirius 5.0 compatibility in the current stream and only "upgrade" for the next stream targeting June 2018.
Comment 4 Laurent Redor CLA 2017-07-31 08:05:10 EDT
(In reply to Cedric Brun from comment #3)
> Hi and thanks for your patchset. Is that something which is only going to be
> integrated for Sirius 5.1 ?  If so I might postpone the integration of the
> fix until Sirius 5.1 would be the lowest version supported and I was
> planning to keep the Sirius 5.0 compatibility in the current stream and only
> "upgrade" for the next stream targeting June 2018.

Yes, this fix is currently only for Sirius 5.1. We can imagine to backport it in Sirius 5.0.x if it simplifies compatibility for EcoreTools.

Otherwise, you can also copy method createConnectionAnchor of Sirius patch [1] in your class TransparencyFigure.

[1] https://git.eclipse.org/r/#/c/95878/5/plugins/org.eclipse.sirius.ext.gmf.runtime/src/org/eclipse/sirius/ext/gmf/runtime/gef/ui/figures/SiriusDefaultSizeNodeFigure.java@68
Comment 5 Laurent Redor CLA 2017-08-01 09:18:48 EDT
Finally, the decision was took to backport this fix in Sirius 5.0.2: https://bugs.eclipse.org/bugs/show_bug.cgi?id=520408
Comment 6 Laurent Redor CLA 2017-08-04 11:49:34 EDT
@Cedric: The backport has been done to Sirius 5.0.2 (not yet released).
Comment 8 Cedric Brun CLA 2017-08-10 07:44:18 EDT
Thanks for the feedback and for the fix!