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

Bug 413876

Summary: [Tooltip] - Filter out &
Product: [RT] RAP Reporter: Stefan Milchram <stefan.milchram>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 Flags: rsternberg: review+
Version: 2.1   
Target Milestone: 2.2 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard: sr211
Attachments:
Description Flags
snippet containing rap and swt examples none

Description Stefan Milchram CLA 2013-07-28 10:37:04 EDT
When calling:

"button.setText("&Hello World");"

the & is filtered out for display, as it marks the mnemonic.
But if you set the same text as tooltip:

"button.setToolTipText("&Hello World");"

the & is displayed.
In SWT (Windows, i couldn't check GTK) method "org.eclipse.swt.widgets.ToolBar.toolTipText(NMTTDISPINFO)" returns the tooltip containing & but Windows filters it out for display
Comment 1 Stefan Milchram CLA 2013-07-28 10:37:58 EDT
Created attachment 233865 [details]
snippet containing rap and swt examples
Comment 2 Ivan Furnadjiev CLA 2013-07-30 07:19:04 EDT
Same in GTK. Fixed in master with commit f14ba7341626e12d0b986f877be3ee2257841836. Marked for back-porting to 2.1 maintenance branch.
Comment 3 Ralf Sternberg CLA 2013-07-30 09:31:26 EDT
+1 to backport this fix to SR 2.1.1
Comment 4 Ivan Furnadjiev CLA 2013-08-05 03:00:41 EDT
Backported to 2.1-maintenance  branch with commit 912122cfe6502c438de950be68fffa2fbd1f57c6.