Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345674 - Support @Image annotation on enum items
Summary: Support @Image annotation on enum items
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sapphire (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Konstantin Komissarchik CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2011-05-12 17:02 EDT by Konstantin Komissarchik CLA
Modified: 2021-11-19 09:22 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Komissarchik CLA 2011-05-12 17:02:27 EDT
It should be possible to annotation enum items with images. This is already possible with the @Label annotation.

A reference usecase for this is the checkbox list property editor when used in
conjunction with enum lists. See related Bug 345671.

Example:

public enum DispatcherEvent
{
    @Label( standard = "forward" )
    @Image( path = "CircleBlue.png" )
    
    FORWARD,

    @Label( standard = "include" )
    @Image( path = "CircleCyan.png" )
    
    INCLUDE,

    @Label( standard = "request" )
    @Image( path = "CircleGreen.png" )
    
    REQUEST,

    @Label( standard = "error" )
    @Image( path = "CircleRed.png" )
    
    ERROR
}
Comment 1 Konstantin Komissarchik CLA 2011-05-12 17:07:44 EDT
Enhancement implemented. Content added to the what's new doc.
Comment 2 Ling Hao CLA 2011-06-09 18:47:34 EDT
Verified.