'Open context when there is no rows in the body region

In my Nattable, I implemented context menu for body region and it is working fine. but if there is no row available in the body region context menu is not appearing.

How to make context menu appear even when there is no rows in the body region.

Code I used:

 uiBindingRegistry.registerMouseDownBinding(MouseEventMatcher.bodyRightClick(SWT.NONE), new PopupMenuAction(bodyMenu));

Thanks in Advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source