Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to add shortcuts for Dynamic menus.(How to add shortcuts for Dynamic menus.)
How to add shortcuts for Dynamic menus. [message #1407214] Tue, 12 August 2014 05:29
sumit singh is currently offline sumit singhFriend
Messages: 140
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
Previous Topic:Link to external jars in plugin?
Next Topic:Error Export Eclipse Product
Goto Forum:
  


Current Time: Fri Jul 31 21:27:12 GMT 2015

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

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