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

Bug 477191

Summary: The repair action reset the font format
Product: [Modeling] Sirius Reporter: Florian Barbin <florian.barbin>
Component: DiagramAssignee: Florian Barbin <florian.barbin>
Status: CLOSED FIXED QA Contact: Laurent Redor <laurent.redor>
Severity: normal    
Priority: P3 CC: laurent.redor, pierre-charles.david
Version: 3.0.0Keywords: triaged
Target Milestone: 3.1.0   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/55736
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=5bfa08e83edfe8f27b63605dd9f274697172b4db
https://git.eclipse.org/r/55946
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=b95959ea4433fd6c5c99025476840bbb6f74d44d
https://git.eclipse.org/r/56150
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=9d04caf38d968cb3c0b742c717277344bc44b041
Whiteboard:

Description Florian Barbin CLA 2015-09-11 09:05:25 EDT
When launching the repair action, the customized font format by the end user are lost. 
This bug will also impact all other multi-valued customized style features.

Technical details:
in org.eclipse.sirius.diagram.ui.tools.internal.actions.repair.AbstractDiagramElementState.storeStyleCustomizations(Customizable), we store the same instance by doing customFeatures.put(featureName, customizable.eGet(structuralFeature));
When setting the the custom feature at the restore time, the feature EList is cleared (by the EMF eSet mechanism) and we lose the stored value since it's the same instance.
Comment 1 Eclipse Genie CLA 2015-09-11 09:42:22 EDT
New Gerrit change created: https://git.eclipse.org/r/55736
Comment 4 Florian Barbin CLA 2015-09-16 04:15:07 EDT
Fixed by 5bfa08e83edfe8f27b63605dd9f274697172b4db. To validate this issue, use an "unsynchronized" diagram, modify the label style (font, color etc.) and launch a repair. The label style should be the same than before the repair action.
Comment 5 Florian Barbin CLA 2015-09-16 10:57:45 EDT
Bug 424422 introduced a regression when opening a Sirius Diagram made before 3.0.x with underline and strike-through labels. Those properties where held by GMF and are no more used in 3.0.x. The end user do not see its label strike or underline anymore
Comment 6 Florian Barbin CLA 2015-09-16 10:58:53 EDT
Reponed following the bug 424422 regression
Comment 7 Eclipse Genie CLA 2015-09-17 08:43:40 EDT
New Gerrit change created: https://git.eclipse.org/r/56150
Comment 9 Florian Barbin CLA 2015-09-23 08:09:22 EDT
Fixed on master. See previous comment.
Comment 10 Laurent Redor CLA 2015-10-07 10:36:14 EDT
Tests of org.eclipse.sirius.tests.unit.diagram.migrationRepairOnStyleCustomizationsTest are OK with Sirius 3.1.0 SR1 (3.1.0-S20150930-080030).
Comment 11 Pierre-Charles David CLA 2015-10-16 09:11:04 EDT
Available in Sirius 3.1.0.