Bug 20718

Summary: TVT2: extra mnemonics in Customize Perspective>Other
Product: [Eclipse Project] Platform Reporter: Richard Bone <rabone>
Component: UIAssignee: Tod Creasey <Tod_Creasey>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: camle, dirk_baeumer, Kevin_Haaland
Version: 2.0   
Target Milestone: 2.1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Extra mnemonics in Java Element Creation
none
Extra mnemonics in Java Search none

Description Richard Bone CLA 2002-06-20 10:29:54 EDT
Build F3, running latest NL fragments.

Go to Window>Customize Perspective>Other...
Select Java Element Creation

In traditional chinese, the elements on the right pane have mnemonics, though 
it doesn't make sense in this context... will attach a screencap.

Now go to Java Search
These elements have extra mnemonics as well.  A screencap for this will follow 
as well.

This bug was opened in response to TPRS ID=155
Comment 1 Richard Bone CLA 2002-06-20 10:30:26 EDT
Created attachment 1531 [details]
Extra mnemonics in Java Element Creation
Comment 2 Richard Bone CLA 2002-06-20 10:30:47 EDT
Created attachment 1532 [details]
Extra mnemonics in Java Search
Comment 3 Erich Gamma CLA 2002-06-23 17:22:31 EDT
the mnemonics were removed since F3 pls verify in 20020620
Comment 4 Dirk Baeumer CLA 2002-07-30 10:11:44 EDT
The actions still have a mnemonics defined in their label (see 
plugin.properties file). Removing the mnemonic there would remove it from all 
menus as well and I could find a way to provide a different string for the 
action to be displayed in the customize dialog. 

Moving to platform for commenting. I don't know how to fix this without 
removing the mnemonic for the menus as well.
Comment 5 Nick Edgar CLA 2002-08-07 14:52:38 EDT
JDT should not remove the mnemonics from its labels.

The perspective customization dialog tries to strip off the mnemonics when 
showing the text for items.  This works for mnemonics indicated using "&?" in 
the label, but not those using " (?)".
See ActionSetLabelProvider and DialogUtil.removeAccel.

Could change DialogUtil.removeAccel to handle the " (?)" pattern as well, 
although it's conceivable that this could trim off a real part of the label, 
not just the mnemonic.

Comment 6 Tod Creasey CLA 2002-08-08 08:41:30 EDT
I have changed DialogUtil to handle both Latin and non-Latin accelerators. This 
functionality is also required by the LightweightActionDescriptor so it should 
be called there too.

The issue is that LightweightActionDescriptor is not a dialog and not in 
org.eclipse.ui.internal.dialogs (it is in org.eclipse.ui.internal).

I have 2 options here
1) Have a reference to org.eclipse.ui.internal.dialogs in 
org.eclipse.ui.internal
2) Make another utility in org.eclipse.ui.internal and have the one in 
org.eclipse.ui.internal.dialogs refer to it (to avoid breaking API).

Nick what is your preference?
Comment 7 Tod Creasey CLA 2002-08-08 10:30:04 EDT
Checking the other classes in org.eclipse.ui.internal there are already 
references to org.eclipse.ui.internal.dialogs so I released the changes into 
DialogUtil and had LightweightActionDescriptor refer to it.

Released to HEAD and 2.01
Comment 8 Tod Creasey CLA 2005-05-10 14:54:17 EDT
Marking as closed.