Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366289

Summary: Use ResourceSet.uriResourceMap in UMLImporter
Product: [Modeling] MDT.UML2 Reporter: Ed Willink <ed>
Component: CoreAssignee: Kenn Hussey <Kenn.Hussey>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P2 Keywords: plan
Version: 4.0.0Flags: Kenn.Hussey: kepler+
Target Milestone: M5   
Hardware: PC   
OS: Windows Vista   
Whiteboard: Community Support

Description Ed Willink CLA 2011-12-10 02:35:41 EST
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.)
Comment 1 Ed Willink CLA 2012-12-16 03:13:17 EST
I think that some Xcore-motivated changes have done something rather similar within EMF. May just need a one-line activation.
Comment 2 Kenn Hussey CLA 2012-12-19 11:04:48 EST
The changes have been committed/pushed to the 'master' branch in git.
Comment 3 Kenn Hussey CLA 2013-01-28 09:16:52 EST
The changes are now available in an integration build for UML2 4.1.0.