Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321487 - [Model Browser] Management of broken references
Summary: [Model Browser] Management of broken references
Status: CLOSED FIXED
Alias: None
Product: MoDisco
Classification: Modeling
Component: Infrastructure (show other bugs)
Version: 0.9.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 0.9.0 M2   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-02 05:52 EDT by Nicolas Guyomar CLA
Modified: 2010-10-18 08:35 EDT (History)
4 users (show)

See Also:
nicolas.bros: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.