| Summary: | Use ResourceSet.uriResourceMap in UMLImporter | ||
|---|---|---|---|
| Product: | [Modeling] MDT.UML2 | Reporter: | Ed Willink <ed> |
| Component: | Core | Assignee: | Kenn Hussey <Kenn.Hussey> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P2 | Keywords: | plan |
| Version: | 4.0.0 | Flags: | Kenn.Hussey:
kepler+
|
| Target Milestone: | M5 | ||
| Hardware: | PC | ||
| OS: | Windows Vista | ||
| Whiteboard: | Community Support | ||
I think that some Xcore-motivated changes have done something rather similar within EMF. May just need a one-line activation. The changes have been committed/pushed to the 'master' branch in git. The changes are now available in an integration build for UML2 4.1.0. |
UMLImporter currently locates numerous pathmap references by linear search of a non-trivial number of known resources with a URI normalization for each resource. If UMLImporter.createResourceSet() invokes if (resourceSet instanceof ResourceSetImpl) { ResourceSetImpl resourceSetImpl = (ResourceSetImpl) resourceSet; Map<URI, Resource> uriResourceMap = resourceSetImpl.getURIResourceMap(); if (uriResourceMap == null) { resourceSetImpl.setURIResourceMap(new HashMap<URI, Resource>()); } } the hashed map can be exploited. (Perhaps not appropriate to migrate to EMF where the number of resources and references may be fewer.)