JMSToolBox is an eclipse-rcp v4.5.2 based application. I tried to upgraded to eclipse v4.6.0 but found a problem with popups menu as follows:
- A part is defined in the e4 model as a
Part Descriptor
(PD). A popup menu is defined inside that PD - On a certain action, the PD descriptor is instanciated and the part is added and displayed in a
Part Stack
. The body of this part is aTabFolder
with multiple tabs corresponding to a JMS Q browsed. Each tab body is basically composed of aTableViewer
/Table
to display JMS messages. Each time a new tab is created, a new
TableViewer
/Table
is created and the popupmenu is registered on theTable
of theTableViewer
with the following line of code:menuService.registerContextMenu(table,<id of the popup menu in the part>);
This works perfectly with eclipse v4.5.2 (Mars) but not with v4.6.0 (Neon) !
With neon, the popup is working only for the first tab: the context menu is visible and @CanExecute
methods associated to the handlers/commands of the menu items are called . For subsequent tabs created, no popup is displayed and @CanExecute
methods for the menu items are not called
If I register a different menu with a different Id (previously added to the PD) for each tab, it works! So I suspect this may be due to the fact that a menu with the same element id is added to multiple TableViever/Table even if it is coming from a different instance of a PD...
Is it a bug in neon? a regression? or do I benefit of a bug in mars that makes the application is working Ok with this version?
For now I have to downgrade (or not upgrade) to eclipse v4.5.2..