| Summary: | Ampersand gets replaced with _ | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Nicolas Born <nicolasborn> | ||||
| Component: | Scout | Assignee: | Project Inbox <scout.core-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | Andreas.Hoegger, bruno.koeferli | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows Vista | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Nicolas Born
The described bug is a SWT feature which applies to most controls, f.e. see the javadoc of SWT Label.setText(String) (http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/Label.html). This means every single ampersand "&" will be interpreted as mnemonic character and won't be displayed as text. In Scout this feature does not make sense for the most labels of the Scout-fields (like GroupBox, SequenceBox, StringField, SmartField, CheckBox, ...) or the value of a LabelField. Therefore Ivan and I decided to provide per Scout project a possibility to escape all mnemonic characters for these controls. In the attached patch you will found a solution which supports the possibility to escape mnemonic characters by extending "decorations" element of the existing extension point "org.eclipse.scout.rt.ui.swt.lookAndFeel" with a new boolean element "escapeMnemonicsOnNonePushControls". If this element is not defined no mnemonic characters will be escaped. Created attachment 196976 [details] patch to enable escaping of mnemonic characters this is patch described in the comment 1 Bruno, as you mentioned the double ampersand (&&) escapes the default mnemonic behavior of any SWT control. To keep the code simple and clean I would prefer to change the text of your project to …&&… Does that work for you? -Andreas Ivan and I discussed this problem again and are both in agreement that the mnemonic behaviour should be the same regardless of which ui the client application is running on. Therefore the escaping should not be made in the texts but by the concret ui implementation. In Scout we have decided to only support mnemonics on actions like Buttons or Menus so the attached patch supports a possibility to disable the "auto mnemonic" feature in SWT to get the same behaviour as in Swing. The ampersand behavior of SWT will not be changed. So project has to escape their ampersand by themselves. Therefore WONTFIX. |