Bug 498914 - Exported SVGs don't show filled diamonds for containment references
Summary: Exported SVGs don't show filled diamonds for containment references
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 4.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.1.0   Edit
Assignee: Laurent Redor CLA
QA Contact: Julien Dupont CLA
URL:
Whiteboard: regression
Keywords: triaged
Depends on:
Blocks: 499108
  Show dependency tree
 
Reported: 2016-07-30 12:58 EDT by Adolfo Sanchez-Barbudo Herrera CLA
Modified: 2016-10-18 11:08 EDT (History)
5 users (show)

See Also:


Attachments
Ecore Diagram (26.69 KB, image/png)
2016-07-30 13:01 EDT, Adolfo Sanchez-Barbudo Herrera CLA
no flags Details
Exported SVG (29.86 KB, application/xml)
2016-07-30 13:05 EDT, Adolfo Sanchez-Barbudo Herrera CLA
no flags Details
Bug498914.zip (11.61 KB, application/x-zip-compressed)
2016-08-03 03:50 EDT, Laurent Redor CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adolfo Sanchez-Barbudo Herrera CLA 2016-07-30 12:58:13 EDT
Hi Folks,

Using Neon Ecore Tools. 

Repro:
- Create a diagram ecore tools with containment references.
- Export the diagram as a SVG file. 
- Open the file with a SVG tool (I used Inkscape)
- The diagram is OK, excepting that the diamonds of containment features are empty (white) rather than filled (black).

I'll send some screenshots.

NB. I swear this was working before.
NB2. I've updated[1] the IDE with nightly update site and I see the same behaviour.

Cheers,
Adolfo.

[1] Features:
-  Sirius Core Runtime	4.1.0.201607291004	
-  Sirius Runtime IDE	4.1.0.201607291004	
-  Sirius Runtime Support for AQL	4.1.0.201607291004
Comment 1 Adolfo Sanchez-Barbudo Herrera CLA 2016-07-30 13:01:50 EDT
Created attachment 263389 [details]
Ecore Diagram
Comment 2 Adolfo Sanchez-Barbudo Herrera CLA 2016-07-30 13:05:55 EDT
Created attachment 263390 [details]
Exported SVG
Comment 3 Laurent Fasani CLA 2016-08-01 08:19:46 EDT
Thanks for your detailed bug report.
We have reproduced this issue and we consider it as valid.
Nevertheless, we have currently not planned to work on it in the following releases.

This bug is indeed a regression from Sirius 3.1.3.
We may also reproduce this issue with the sirius following sample:
org.eclipse.sirius.sample.ecore.design/description/ecore.odesign

Note that the bug is also reproducible with export to png file.
Comment 4 Cedric Brun CLA 2016-08-02 10:24:50 EDT
Thanks for bringing this up, indeed this issue deserves to be considered for the next maintenance release as it's a regression which might affect many users. 

Community feedback is essential to evolve Sirius in the right direction. Thanks again!
Comment 5 Laurent Redor CLA 2016-08-03 03:48:50 EDT
I confirm that the problem is a regresion caused by bug 491913.

For information, there is another visible regression on shadow border (it is not gray).
Comment 6 Laurent Redor CLA 2016-08-03 03:50:25 EDT
Created attachment 263435 [details]
Bug498914.zip

EcoreTools project "Bug498914" from Bug498914.zip contains a similar diagram as original sample https://bugs.eclipse.org/bugs/attachment.cgi?id=263389

Steps to reproduce:
* Import the project Bug498914
* Open the diagram "root class diagram"
* Export the diagram as an SVG file. 
* Open the file with an SVG tool (I used Inkscape)
* The diagram is OK, excepting that the diamonds of containment features are empty (white) rather than filled (black) and the shadow borders of NewEClass2 and NewEClass5 are yellow (instead of gray).
Comment 7 Laurent Redor CLA 2016-08-03 03:58:03 EDT
The gerrit  https://git.eclipse.org/r/78375 is a proposition of fix.

In bug 491913, a new attribute bgPattern has been added to correctly
handled the gradient in all kind of format for "Export as image". But it
is not correctly set during the popState() and pushState() methods.
So after drawing a shape with gradient background color, there was a
side effect for following shapes.

To validate the fix, you can use the steps to reproduce of comment 6.
Comment 8 Laurent Redor CLA 2016-08-03 09:53:25 EDT
The fix has been pushed and will be available in the next nightly build.
Comment 9 Adolfo Sanchez-Barbudo Herrera CLA 2016-08-04 11:39:56 EDT
Excellent.

I can verify that this work again.

Thanks for the awesomely prompt reaction. Good job.

Cheers,
Adolfo
Comment 10 Pierre-Charles David CLA 2016-10-18 11:08:30 EDT
Available in Sirius 4.1.0, see https://wiki.eclipse.org/Sirius/4.1.0 for details.