Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323158 - [Commands] Accelerator is displayed twice in one menu item
Summary: [Commands] Accelerator is displayed twice in one menu item
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact: Paul Webster CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-19 11:03 EDT by Kamil Fejfar CLA
Modified: 2010-11-09 08:32 EST (History)
0 users

See Also:


Attachments
Broken edit menu screenshot (8.25 KB, image/x-png)
2010-08-19 11:05 EDT, Kamil Fejfar CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kamil Fejfar CLA 2010-08-19 11:03:42 EDT
Build Identifier: M20100211-1343

This problem happens when a display name of an action includes accelerator separated with @ or \t (e.g. edit actions in czech localization bundle (Workbench_cut=Vyjmout@Ctrl+X))

One problem seems to be in LabelRetargetAction, and its appendAccelerator(String) method. There is probably forgotten to insert delimiter @ or \t. This causes problem in Undo, Redo actions.

Another problem can be in CommandContributionItem (Cut, Copy, Paste actions). It probably does not expect, that name can contain an accelerator.

Reproducible: Always

Steps to Reproduce:
1. Run eclipse with localization bundle where action names include accelerator (e.g. czech localization bundle) 
2. Go to edit menu.
Comment 1 Kamil Fejfar CLA 2010-08-19 11:05:35 EDT
Created attachment 177008 [details]
Broken edit menu screenshot
Comment 2 Paul Webster CLA 2010-11-09 08:31:34 EST
You should not include the accelerator in your action label, and definitely not in a command name.

In an RCP app or IDE app, keybindings need to be used.

PW
Comment 3 Paul Webster CLA 2010-11-09 08:32:48 EST
A potential option ... strip out the accelerator text from the name.  But that would mean you have incorrect information (since the name says one thing, and we would not honour it in the UI).

PW