| Summary: | Save should automatically create a correct "import" and ns prefixes | ||
|---|---|---|---|
| Product: | [Modeling] MDT.BPMN2 | Reporter: | Reiner Hille <reiner.hille-doering> |
| Component: | Core | Assignee: | Henning Heitkoetter <hheitkoetter> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Reiner Hille
Hi Reiner, are you working on this or planning to do so? If not, I'd be willing to implement this, as I also need this feature. I had implemented something similar for bug 301328 (for the "old" metamodel). As far as I see it, all external references have to be checked for existence of a corresponding import element while preparing to save (e.g. in Bpmn2ResourceImpl.prepareSave). If no import element is found, a new one should be created - this has to be done before actually beginning to serialize. With EcoreUtil.ExternalCrossReferencer.find(Resource) there is a utility method for finding all external references. Alternatively, we could continue to use the already existing loop over all referenced objects in prepareSave - whatever is faster. Hi Henning, yes, this is exactly what I had in mind too. Please proceed implementing it if you have time. I'm currently working for Extensibility and for a URIConverter for XSD (as they don't support id object resolution. Reiner. Fixed in commit 147aede43d4438c4195bee60fa2b4a0f5c51c52e |