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

Bug 367776

Summary: Swing: Missing Mnemonics on special characters
Product: z_Archived Reporter: Bruno Koeferli <bruno.koeferli>
Component: ScoutAssignee: Project Inbox <scout.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jeremie.bresson, judith.gull, mvi
Version: unspecifiedFlags: mvi: luna+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch to identify special characters as mnemonics none

Description Bruno Koeferli CLA 2012-01-03 11:44:14 EST
Created attachment 208948 [details]
Patch to identify special characters as mnemonics

Build Identifier: 3.7.0.2011-Jun 2011

PROBLEM DESCRIPTION:
In Swing Mnemonics on special characters (f.e. äöüÄÖÜéÉ...) will not be recognized, but SWT will do.

EVALUATION:
The problem is located in the class StringUtility, presumably in the Regex pattern
MNEMONIC_PATTERN. This pattern is used to identify the Mnemonic character as well as to remove the Mnemonic from a string. The manual identification is only needed in Swing, SWT can handle these identification by its own.

PROPOSED SOLUTION:
The MNEMONIC_PATTERN has to be adjusted to also match special characters as äöü... The attached patch basically allows every character which is not a whitespace or an ampersand (&) itself.

Reproducible: Always
Comment 1 Judith Gull CLA 2013-04-15 08:47:14 EDT
Thanks for the patch. It looks good to me. Please add tests for the changed method (StringUtility.getMnemonic).
Comment 2 Jeremie Bresson CLA 2013-09-12 07:54:10 EDT
Change opened by Matthias Nick for develop branch:
https://git.eclipse.org/r/16322/
Comment 3 Matthias Villiger CLA 2013-09-12 10:36:00 EDT
pushed commit c2db2766826bf9cc3fffb25d35fa644d799c69ec (http://git.eclipse.org/c/scout/org.eclipse.scout.rt.git/commit/?h=develop&id=c2db2766826bf9cc3fffb25d35fa644d799c69ec)

Thanks Matthias & Bruno for the contribution!

Available with scout 3.10 M2 or nightly version >= 2013-09-13

@Bruno: Can you verify the change with one of these version please?
Comment 4 Bruno Koeferli CLA 2013-10-10 08:12:13 EDT
Tested with version 3.10.0.20131004-1128
Comment 5 Matthias Zimmermann CLA 2014-07-01 03:20:53 EDT
Shipped with Eclipse Luna Release