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

Bug 363374

Summary: [metatype] The bundle providing the metadata must be resolved before any metadata is made available.
Product: [Eclipse Project] Equinox Reporter: John Ross <jwross>
Component: CompendiumAssignee: John Ross <jwross>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tjwatson
Version: 3.7.1   
Target Milestone: Juno   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description John Ross CLA 2011-11-09 14:37:56 EST
The bundle providing the metadata (i.e. the bundle passed as an argument to MetaTypeService.getMetaTypeInformation()) must be resolved before the metatype impl will provide any metatype information based on metadata xml files contained within that bundle. This is because the impl now uses BundleWiring.findEntries(), and A BundleWiring only exists if the bundle is resolved. Previously, Bundle.findEntries() was used.

We should consider changing this back, as there does not appear to be any reason not to provide this metadata even if the bundle is not resolved.

Another issue with the current impl is that it will cache the MetaTypeInformation object created for the unresolved bundle. Consequently, even if another call is made once the bundle has resolved, the metadata will never show up.
Comment 1 Thomas Watson CLA 2011-11-09 15:28:34 EST
I agree, we should change back to using Bundle.findEntries.  If we did that then the issue of caching the object from unresolved bundles would not be and issue.
Comment 3 John Ross CLA 2011-11-21 08:24:18 EST
I missed a couple of places that still use BundleWiring.