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

Bug 457854

Summary: Style customization on backgroundStyle of FlatContainerStyleDescription has no visible effect
Product: [Modeling] Sirius Reporter: Max Bureck <max.bureck>
Component: CoreAssignee: Belqassim Djafer <belqassim.djafer>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: laurent.redor, pierre-charles.david
Version: 2.0.0Keywords: triaged
Target Milestone: 3.0.0M6   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/42312
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=7339f1bd9bd29c7ac70a91b489672db555937a3c
Whiteboard: trivial
Attachments:
Description Flags
Example Project: Style customization of FlatContainerStyleDescription.backgroundStyle does not lead to visual update
none
Initial use case completed none

Description Max Bureck CLA 2015-01-19 11:34:16 EST
Hi,

I have a style customization that changes the backgroundStyle property of a FlatContainerStyleDescription. This actually does set the attribute. I debugged BestStyleDescriptionRegistry#applyEAttributeCustomization(...) to check if the EAttribute gets set correctly. Unfortunately the editor does not update the background of the gradient. If I close and re-open the editor the background actually gets updated. Was this left out intentionally, was this property simply forgotten?
Comment 1 Laurent Redor CLA 2015-01-26 04:29:37 EST
Hi,

Could you please join a minimal reproduction use case?

Regards,

Laurent
Comment 2 Max Bureck CLA 2015-01-26 05:15:54 EST
Created attachment 250219 [details]
Example Project: Style customization of FlatContainerStyleDescription.backgroundStyle does not lead to visual update
Comment 3 Max Bureck CLA 2015-01-26 05:16:50 EST
I attached a project, with a meta model and a simple diagram. Open the .aird file, open the one existing element and select the node on the diagram. When chaning the semantic boolean property "liquid" the background of the node should change, but it doesn't. You have to close and re-open the .aird file to get the visual change.
Comment 4 Laurent Redor CLA 2015-01-26 11:48:21 EST
Only a close and reopen of the diagram is needed (not of all aird file) but I confirm the problem.
Comment 5 Laurent Redor CLA 2015-01-27 03:40:31 EST
Short analysis: The style is correctly refreshed after the change of value. The problem is at the figure level.

A test is probably missing in org.eclipse.sirius.diagram.ui.edit.internal.part.DiagramContainerEditPartOperation.refreshVisuals(IDiagramContainerEditPart).

I completed the initial use case with a foreground color change in the customization.

Steps to reproduce:
* Import the project dynamic_background in your workspace
* Open TestDiagram.aird
* Open the diagram "new Diagram" => the node has a gradient color from top to bottom (white to red).
* Select the node, in the Properties view, tab Semantic, change the value Liquid to true 
=> The foreground color changes from red to green: OK 
=> The background style (top to bottom) stays the same: KO
* Save the diagram and close it.
* Open the diagram again
=> The background style has been changed: "top to bottom" to "diagonal". This background style should be obtained directly after the semantic change.
Comment 6 Laurent Redor CLA 2015-01-27 03:41:05 EST
Created attachment 250243 [details]
Initial use case completed
Comment 7 Eclipse Genie CLA 2015-02-20 10:34:22 EST
New Gerrit change created: https://git.eclipse.org/r/42312
Comment 9 Pierre-Charles David CLA 2015-02-23 04:21:54 EST
Fixed by 7339f1bd9bd29c7ac70a91b489672db555937a3c.
Comment 10 Belqassim Djafer CLA 2015-04-13 08:39:21 EDT
Verified on Sirius 3.0.0M6
Comment 11 Pierre-Charles David CLA 2015-06-24 11:14:01 EDT
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.