Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366289 - Use ResourceSet.uriResourceMap in UMLImporter
Summary: Use ResourceSet.uriResourceMap in UMLImporter
Status: VERIFIED FIXED
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: 4.0.0   Edit
Hardware: PC Windows Vista
: P2 enhancement (vote)
Target Milestone: M5   Edit
Assignee: Kenn Hussey CLA
QA Contact:
URL:
Whiteboard: Community Support
Keywords: plan
Depends on:
Blocks:
 
Reported: 2011-12-10 02:35 EST by Ed Willink CLA
Modified: 2013-01-28 09:16 EST (History)
0 users

See Also:
Kenn.Hussey: kepler+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.