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

Bug 185960

Summary: [Tool] MarqueeToolEntry has hard coded icons
Product: [Tools] GEF Reporter: Anthony Hunter <ahunter.eclipse>
Component: GEF-Legacy GEF (MVC)Assignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jakub.jurkiewicz, nyssen
Version: 3.3   
Target Milestone: 3.7.1 (Indigo) M3   
Hardware: All   
OS: All   
Whiteboard:

Description Anthony Hunter CLA 2007-05-08 10:55:18 EDT
MarqueeSelectionTool supports three modes:
nodes
connections
nodes and connections

Bug 84262 provided icons for these three modes and the Logic Example provides an example.

MarqueeToolEntry allows one to specify which if the three modes the tool is, but the icons do not reflect the mode. This is because MarqueeToolEntry hard codes the default icons.

MarqueeToolEntry needs to changes to the constructor to be able to secify the three modes.
Comment 1 Jakub Jurkiewicz CLA 2007-06-20 09:28:04 EDT
Is it really necessary to make any changes to the constructors of MarqueeToolEntry  class? There are methods MarqueeToolEntry#setSmallIcon(ImageDescriptor icon) and MarqueeToolEntry#setLargeIcon(ImageDescriptor icon) (as MarqueeToolEntry extends PaletteEntry) and these methods can be used to set the icons.
Comment 2 Alexander Nyßen CLA 2010-11-03 14:52:12 EDT
Changed MarqeeSelectionEntry to provide an icon (indicating the behavior mode) in case no icon was explicitly set (MarqueeToolEntry overwrites getLargeIcon() and getSmallIcon() to return an appropriate icon in case the super implementation does not provide one). Changed the constructor to not set any icon by default. 

Changed SharedImages to provide ImageDescriptors for new marquee icons. 

Changed MarqueeSelectionTool to expose a DEFAULT_MARQUEE_BEHAVIOR constant, which may be used to determine the default behavior (rather than hard-referencing BEHAVIOR_NODES_CONTAINED).
Comment 3 Alexander Nyßen CLA 2010-11-03 14:55:04 EDT
(In reply to comment #2)
> Changed MarqeeSelectionEntry to provide an icon (indicating the behavior mode)
> in case no icon was explicitly set (MarqueeToolEntry overwrites getLargeIcon()
> and getSmallIcon() to return an appropriate icon in case the super
> implementation does not provide one). Changed the constructor to not set any
> icon by default. 
> 
> Changed SharedImages to provide ImageDescriptors for new marquee icons. 
> 
> Changed MarqueeSelectionTool to expose a DEFAULT_MARQUEE_BEHAVIOR constant,
> which may be used to determine the default behavior (rather than
> hard-referencing BEHAVIOR_NODES_CONTAINED).

All changes committed to cvs HEAD (3.7).