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

Bug 321487

Summary: [Model Browser] Management of broken references
Product: [Modeling] MoDisco Reporter: Nicolas Guyomar <nicolas.guyomar>
Component: InfrastructureAssignee: Nicolas Bros <nicolas.bros>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: fabien.giquel, hugo.bruneliere, modisco.web-inbox, nicolas.bros
Version: 0.9.0Flags: nicolas.bros: indigo+
Target Milestone: 0.9.0 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Nicolas Guyomar CLA 2010-08-02 05:52:51 EDT
Hi,

There should be more than a red customization to indicate that a resource is missing while browsing a model in the MoDisco Model Browser.

The red customization could be used by anyone for another purpose, and because clicking on the resource does not raise any flag, it seems to me that the "missing resource" information is not clear enough.

There could be a message in the MoDisco Logger, or an error message such as the "Reflective Ecore Model Editor" one.

As a enhancement, would it be possible to know if the whole resource (xmi file) is missing, or if it is just a model element ?

Regards

Nicolas
Comment 1 Nicolas Bros CLA 2010-09-13 09:46:43 EDT
Actually, an EObject appearing in red means that this EObject has a null eResource(). This is normal in the case of some EObjects, like instances of EFactory for example. So, this is not by itself reason enough for an error message.

> would it be possible to know if the whole resource (xmi file) is missing,
> or if it is just a model element?
since the resource is null in this case, I don't believe that's possible

Maybe what you want is for the model browser to be able to validate the model, and report validation errors like the sample reflective Ecore editor?
Comment 2 Nicolas Bros CLA 2010-09-13 12:21:08 EDT
In revision 3025, I replaced hardcoded color customizations:
- elements with a null resource get their icon striken through
- elements not in the first resource get a small "shortcut" arrow on their icon
Comment 3 Nicolas Bros CLA 2010-09-14 10:41:44 EDT
I am marking this bug as fixed, since I fixed the potential clash between the hard-coded customizations and the user-defined customizations. Please open a separate bug if you need model validation.
Comment 4 Hugo Bruneliere CLA 2010-10-05 04:28:57 EDT
Bug fixed.