Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Ampersands showing on menu labels, instead of mnemonics
Ampersands showing on menu labels, instead of mnemonics [message #996703] Wed, 02 January 2013 18:05 Go to next message
Joel Becker is currently offline Joel BeckerFriend
Messages: 14
Registered: December 2012
Junior Member
Hi,
I have mnemonics defined for all of my menu items, and all but 5 of them work fine. Those other 5 display the & ampersand in the label: e.g. "&New", "&Open" instead of underlining the N and the O. I can't see any difference between these menu items and the others.

My XMI looks like this for the ones showing the &:
        <children xsi:type="menu:HandledMenuItem" xmi:id="_HPcMoEnkEeKjOrl5Eoy1DA" elementId="" label="&amp;New" iconURI="platform:/plugin/ui2/icons/BridgePoint_New.png" tooltip="Creates a new election project" mnemonics="" command="_NdVSQEnkEeKjOrl5Eoy1DA"/>
        <children xsi:type="menu:HandledMenuItem" xmi:id="_AfdjH0njEeKjOrl5Eoy1DA" label="&amp;Open" iconURI="platform:/plugin/ui2/icons/BridgePoint_Open.png" mnemonics="O" command="_AfdjE0njEeKjOrl5Eoy1DA"/>
        <children xsi:type="menu:HandledMenuItem" xmi:id="_wpMmQEnoEeKjOrl5Eoy1DA" elementId="" label="&amp;Delete" iconURI="platform:/plugin/ui2/icons/BridgePoint_Delete.gif" mnemonics=""/>
        <children xsi:type="menu:HandledMenuItem" xmi:id="_09rTMEnoEeKjOrl5Eoy1DA" elementId="" label="&amp;Close" iconURI="platform:/plugin/ui2/icons/BridgePoint_Close.png" mnemonics=""/>


And like this for some of the ones where the mnemonics work, not showing the &:
        <children xsi:type="menu:HandledMenuItem" xmi:id="_PaABAEnpEeKjOrl5Eoy1DA" elementId="" label="&amp;Import Data" iconURI="platform:/plugin/ui2/icons/BridgePoint_ImportData-PreElection.png" command="_dPKzUEnkEeKjOrl5Eoy1DA"/>
        <children xsi:type="menu:HandledMenuItem" xmi:id="_cClroEoJEeK42erLaNAfoQ" elementId="" label="Import I&amp;mages" iconURI="platform:/plugin/ui2/icons/BridgePoint_ImportImages-PreElection.png" mnemonics="" command="_n_DdcEnkEeKjOrl5Eoy1DA"/>
        <children xsi:type="menu:HandledMenuItem" xmi:id="_oCucsEoJEeK42erLaNAfoQ" elementId="" label="Edit &amp;Options" iconURI="platform:/plugin/ui2/icons/BridgePoint_EditOptions.png" mnemonics="" command="_ruBCgEnkEeKjOrl5Eoy1DA"/>



I have tried putting the mnemonic letter in the "Mnemonics" field of the menu item editor (in addition to the & in the label), I tried clearing the workspace on launch, and clearing the configuration area on launch. I also am using the -clearPersistedState command line argument. Any ideas?

-Joel

[Updated on: Wed, 02 January 2013 19:30]

Report message to a moderator

Re: Ampersands showing on menu labels, instead of mnemonics [message #1002373 is a reply to message #996703] Fri, 18 January 2013 13:30 Go to previous messageGo to next message
Eclipse UserFriend
Please file a bug on https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=UI
Re: Ampersands showing on menu labels, instead of mnemonics [message #1690449 is a reply to message #1002373] Fri, 27 March 2015 11:16 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
I just stumbled onto the same issue. I have found that the mnemonic set with "&" in the label will work if you manualy delete the attribute mnemonics="" from every HandledMenuItem.

[Updated on: Fri, 27 March 2015 11:17]

Report message to a moderator

Re: Ampersands showing on menu labels, instead of mnemonics [message #1690452 is a reply to message #1690449] Fri, 27 March 2015 11:28 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Added issue https://bugs.eclipse.org/bugs/show_bug.cgi?id=463280
Re: Ampersands showing on menu labels, instead of mnemonics [message #1690462 is a reply to message #1690452] Fri, 27 March 2015 12:34 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Are you talking about SWT or JavaFX renderers? Please note that in
JavaFX the _ is used to define the mnemonics!

Tom

On 27.03.15 12:28, Christoph Keimel wrote:
> Added issue https://bugs.eclipse.org/bugs/show_bug.cgi?id=463280
Re: Ampersands showing on menu labels, instead of mnemonics [message #1690471 is a reply to message #1690462] Fri, 27 March 2015 13:34 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
In this case I am talking only about the SWT renderer.
Re: Ampersands showing on menu labels, instead of mnemonics [message #1690488 is a reply to message #1690471] Fri, 27 March 2015 15:09 Go to previous message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
I pushed a patch to fix this: https://git.eclipse.org/r/44755
Previous Topic:How to use the attribute mnemonic for menus and menu items?
Next Topic:Cannot Get Access to the Main ToolBar
Goto Forum:
  


Current Time: Tue Mar 19 02:03:16 GMT 2024

Powered by FUDForum. Page generated in 0.05046 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top