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

Bug 344292

Summary: Metatype: ObjectClassDefinition.getIcon(int) should never return null if an icon exists.
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.7Flags: tjwatson: review+
Target Milestone: 3.7 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed Patch none

Description John Ross CLA 2011-04-29 10:57:21 EDT
Currently, the implementation will return null if the size parameter does not match the size of the icon as specified within the <Icon> "size" XML attribute.

The CT is changing so that implementations must never return null if a valid icon exists and the size parameter is a positive integer. The parameter represents the requested size. The icon should always be returned even when it does not represent the requested size.

See
https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1975
https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1974
https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1979
Comment 1 John Ross CLA 2011-04-29 10:59:44 EDT
Created attachment 194366 [details]
Proposed Patch

This patch simply removes the check to see if the requested icon size matches the specified size.
Comment 2 Thomas Watson CLA 2011-04-29 11:11:49 EDT
Patch looks good.  A separate bug should be opened since we think the OSGi schema is wrong and multiple icons should be allowed.  I suggest we address that bug post 3.7.
Comment 3 John Ross CLA 2011-04-29 11:44:45 EDT
Changes committed to head.