Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to add shortcuts for Dynamic menus.
How to add shortcuts for Dynamic menus. [message #1407216] Tue, 12 August 2014 05:31 Go to next message
Sumit Singh is currently offline Sumit SinghFriend
Messages: 141
Registered: October 2012
Location: Bangalore
Senior Member

In my RCP application I'm using dynamic menu.

I want to add shortcuts for that, there is option to set setMnemonics but I want to set shortcut let say ALT+1

    @AboutToShow
    public void aboutToShow(List<MMenuElement> items) {
       MDirectMenuItem dynamicItem = MMenuFactory.INSTANCE.createDirectMenuItem();
       dynamicItem.setLabel("Test Menu");
       dynamicItem.setTooltip("Test Menu tooltip");
       dynamicItem.setContributorURI("platform:/plugin/com.sumit.test");  
       dynamicItem.setContributionURI"bundleclass://com.sumit.test/com.sumit.test.TestHandler");
       dynamicItem.setMnemonics("T");
       items.add(dynamicItem);
    }



Shortcut are possible with commands but in this case is there any workaround?.

Thanks,
Sumit
Re: How to add shortcuts for Dynamic menus. [message #1407395 is a reply to message #1407216] Tue, 12 August 2014 13:55 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 877
Registered: January 2012
Senior Member

Quote:
Shortcut are possible with commands but in this case is there any workaround?


No, it's not possible. It goes against the whole approach of commands/keybinding approach: how would the system handle two different direct menu items both specify the same shortcut?

Brian.
Previous Topic:Weird behaviour on standalone Luna application
Next Topic:Fragment plugin not used outside of eclipse
Goto Forum:
  


Current Time: Sun Jan 24 07:11:32 GMT 2021

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

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

Back to the top