| Summary: | Sample Reflective Ecore Editor does not re-resolve reloaded proxies | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Ed Willink <ed> |
| Component: | Core | Assignee: | Ed Merks <Ed.Merks> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 1.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows Vista | ||
| Whiteboard: | |||
|
Description
Ed Willink
No, editing a model for which instances exist isn't supported. The model could change arbitrarily in ways that invalidate the instance. Yes, clearly for an arbitrary meta-model change the model cannot survive. But 1: there is a significant use case in which the meta-model change is compatible where it is unkind to require the user to close and re-open the editor. It would be nice, perhaps to offer a do you want to reload prompter, that may then fail dreadfully during reload just as an independent reload would fail. But 2: the Sample Reflective Ecore Editor continues after a meta-model change having reloaded the meta-model. A wide variety of nasty NPEs, CCEs, IAEs, happen to the ongoing usage, many of them are in the OCL validation, but some are in EMF alone. If reloading the meta-model was invalid, it should not have been reloaded. Things like EObject.eClass() would need to resolve EClass proxies, but I don't want to add such code for all clients. The new EClass could be totally different, so any type of failure is possible anyway. I don't see a good way to make this robust, nor do I have the time. Contributions that don't impact the core runtime would be interesting to see. Agree; it definitely should impact core run-time. I'm thinking in terms of a refreshMetaModel facility that could be invoked from EcoreEditor.handleChangedResources. It would a) resolve all eClass proxies b) diagnose incompatibilities with the features and perhaps one day c) offer an opportunity to delete/rename offending elements |