0

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 a TabFolder with multiple tabs corresponding to a JMS Q browsed. Each tab body is basically composed of a TableViewer/Table to display JMS messages.
  • Each time a new tab is created, a new TableViewer/Table is created and the popupmenu is registered on the Table of the TableViewer 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..

titou10
  • 2,814
  • 1
  • 19
  • 42
  • I think you will have to report this on Eclipse [bugzilla](https://bugs.eclipse.org) as only the developers can answer this. I can see the EMenuService code has changed but it is not clear why. – greg-449 Jun 23 '16 at 20:02
  • Done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=496695 – titou10 Jun 24 '16 at 02:17

1 Answers1

0

For reference, I pushed some code to correct the problem. It will be in eclipse v4.6.1+ bug #496695

titou10
  • 2,814
  • 1
  • 19
  • 42