- public void menuAboutToShow(IMenuManager manager) {
- fillTimeGraphEntryContextMenu(fEntryMenuManager);
- fEntryMenuManager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
+ public void menuDetected(MenuDetectEvent event) {
+ Point p = timeGraphControl.toControl(event.x, event.y);
+ /*
+ * The TimeGraphControl will call the TimeGraphEntryMenuListener
+ * before the TimeEventMenuListener. If the event is
+ * triggered on the namespace then show the menu else
+ * clear the menu.
+ */
+ if (p.x < getTimeGraphViewer().getNameSpace()) {
+ timeGraphControl.setMenu(entryMenu);
+ } else {
+ timeGraphControl.setMenu(null);
+ event.doit = false;
+ }