Using Popup Menu and MDirectMenuItem [message #1701720] |
Wed, 15 July 2015 05:00  |
Eclipse User |
|
|
|
Hello everybody,
I am using Eclipse Mars (Version 4.5, Build I20150603-2000) and e4 tools ( 0.14.0.v20141225-1728) to develop a RCP application.
In my application, I have a Tree where I add a popup menu to a selected item. On this menu, I add MDirectMenuItems that directly call specific handler classes. The popup menu works well and adding the MDirecMenuItems as well. But when I try to execute an added MDirecMenuItem, it does not work. I am using the following code on the aboutToShow() method to create my MDirectMenuItems:
MDirectMenuItem directMenuItem = modelService.createModelElement(MDirectMenuItem.class);
directMenuItem.setLabel("option1");
directMenuItem.setContributionURI("bundleclass://com.example.test/com.example.test.handlers.OptionHandler");
items.add(directMenuItem);
Do I miss anything?
I attach an example that reproduces this behavior.
Thanks for your help
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05539 seconds