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

Bug 439402

Summary: Label decoration for files containing errors
Product: [Modeling] Sirius Reporter: Benoit Ries <benoit.ries>
Component: CoreAssignee: Project inbox <sirius.core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: benoit.ries, florian.barbin, maxime.porhel
Version: 1.0.0Keywords: triaged
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
file decoration error none

Description Benoit Ries CLA 2014-07-11 03:59:35 EDT
Created attachment 244991 [details]
file decoration error

When I have a file with errors, the file label decoration doesn't show the related red star, see screenshot attached to this post. Note that the decoration appears correctly on projects and folders.

Hint by Maxime Porel from Eclipse Sirius Forum reply:

"The Sirius's CNF content management label provider used in the Modeling
Exlorer adds the "M" decorator to the file icon [1]. It get the original
image, add the decorator and use a cache. When the validation add its
decorator, I think we get the previous decorated icon from the
SiriusEditPlugin cache and so the image might not be decorated. We
should eventually check the descriptors in this class before taking the
cached image and look why the validation decorator is not added by the
decorator service."

[1]
org.eclipse.sirius.ui.tools.internal.views.common.navigator.SiriusCommonLabelProvider.getImage(Object)
Comment 1 Maxime Porhel CLA 2014-07-11 11:06:15 EDT
Steps to reproduce: 
 * Open the Modeling/Sirius perspective
 . Create a modeling project
 . Create a new ecore model
 . In the opened ecore editor, right clic > validate the unnamed package
 . The validation fails
 . No decorator is added on the ecore file.

In the modeling explorer view, clic on the down arrow > Customize View... and deselect the Sirius Content Management: the error decorator appears on the invalid ecore file. 


Note: the decorator extension point has not used to prevent to load Sirius if a decorator is needed somewhere not in Sirius.
Comment 2 Maxime Porhel CLA 2014-07-11 11:10:10 EDT
 Note: the decorator extension point has not been used to prevent to load Sirius
 if a decorator is needed somewhere not in Sirius.
Comment 3 Maxime Porhel CLA 2014-07-11 11:13:01 EDT
I have changed the Hardware field to All as it was detected on Mac and reproduced on Windows.
Comment 4 Florian Barbin CLA 2019-07-03 05:41:32 EDT
This issue has been fixed on Sirius 6.0.3, 6.1.3 and 6.2.1. See Bug 546028 and related clones for more details. I close this issue as resolved, do not hesitate to reopen it if not.

*** This bug has been marked as a duplicate of bug 546028 ***