| Summary: | ModelUtils.load ignores multi-rooted Ecore resources | ||
|---|---|---|---|
| Product: | [Modeling] Acceleo | Reporter: | Ed Willink <ed> |
| Component: | Core | Assignee: | Project Inbox <acceleo-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | laurent.goubet |
| Version: | 3.0.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Ed Willink
Ed, The ModelUtils utility class was designed as such, and though we know full well that more than a single root can exist in a model (as mentionned in the javadoc of each of our ModelUtils#load() methods : <p>This will return the first root of the loaded model, other roots can be accessed via the resource's content.</p>), we return the first root for ease of use. Most resources will only contain a single root we need to access (Acceleo's mtl files can only contain a single module, UML files often contain a single Model (though they do contain stereortype applications and the such...), etc). We make this assumption so as not to always iterate on every root, which can be extremely costly with UML. However, if there _are_ actual locations in the code where we should go back up to the resource to check for other roots, then these are bugs. Please raise separate entries for them. |