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

Bug 406233

Summary: [commands] Tooltip not shown on dropdown menu buttons
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: antonm, ken_walker
Version: 3.0   
Target Milestone: 3.0 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
dropdown menu button none

Description Mark Macdonald CLA 2013-04-22 12:01:03 EDT
Created attachment 229980 [details]
dropdown menu button

I am rendering a command as a list of choices using a "choiceCallback", like this:
> var myCommand = new mCommands.Command({
>   name: "View",
>   tooltip: "Change what to show in the sidebar", // XXXX
>   id: "orion.sidebar.viewmode",
>   visibleWhen: function() { return true; },    
>   choiceCallback: mycallback
> });
> 
> commandRegistry.addCommand( foo ); 
> commandRegistry.registerCommandContribution( ... );
> commandRegistry.renderCommands( ... );

However, when you hover over the drop-down menu button, the tooltip does not appear.
Comment 1 Mark Macdonald CLA 2013-05-08 09:34:42 EDT
Now that some dropdown menus use icons instead of text, we really need tooltips.
Comment 2 Mark Macdonald CLA 2013-05-29 11:24:28 EDT
* http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=6459f8d
* http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=6e79a0a

The command groups (see [1]) can now provide a tooltip. If no tooltip is provided, and the group is rendered as an image-based dropdown menu, the group's name is used as the tooltip instead.

[1] https://orion.eclipse.org/jsdoc/symbols/orion.commandregistry.CommandRegistry.html#addCommandGroup