Paul Verest
Paul Verest

Reputation: 63912

configer hot letters in Eclipse plugin menu (& does not work)

As Eclipse plugin developer, how to specify what letter in menu item would be hot.

For example, when user open File -> New (e.g. with Alt+Shift+N), then
make n to select _N_ode.js project
make p to select _P_hantomJS project
etc

I think I just need to add special simbol before the letter

into name="Node.js Express Project"

but & does not work.


(source: nodeclipse.org)

Upvotes: 1

Views: 193

Answers (2)

Paul Verest
Paul Verest

Reputation: 63912

Just add & as &

        name="&Node.js Project"

Upvotes: 0

greg-449
greg-449

Reputation: 111142

You can use the mnemonic attribute of the command and menu elements in the org.eclipse.ui.menus extension point:

<extension
     point="org.eclipse.ui.menus">
  <menuContribution
        locationURI="popup:org.eclipse.ui.ide.MarkersView">
      <command
            commandId="org.eclipse.ui.navigate.goToResource"
            mnemonic="X"
            style="push">
      </command>
  </menuContribution>

  <menuContribution
        locationURI="popup:org.eclipse.ui.ide.MarkersView">

     <menu
           commandId="org.eclipse.ui.navigate.showInQuickMenu"
           id="org.eclipse.ui.ide.markers.showInMenu"
           label="Show In"
           mnemonic="Y">

Upvotes: 1

Related Questions