Community
Participate
Working Groups
After using the context-menu in the Multicore Visualizer (right-click), the next click on the visualizer does not work. I have to click a second time to do a selection.
It seems that the context menu might be interfering with the mouseUp event, which is not triggered for right mouse clicks. Because of this, the MouseMonitor is left in a strange state, where it thinks that a mouse drag is in progress. If the next (left) click is to select something, the mouseUpHandler() will not go into the selection code because m_mouseDrag is true. The following (left) click will work as expected to select something.
I had the chance to debug this problem a bit further. If I add printouts, in MouseMonitor, methods: mouseDownHandler() and mouseUpHandler(), I can see that the printouts are generated in succession when I left-click and release, in the multicore visualizer. But when I right-click and release, only the mouseDownHandler() is called. It seems that the mouseUp event is somehow lost. If I set breakpoints in both methods, then the context menu does not pop-up upon right-clicking and both breakpoints actually hit. This made me think that the context menu coming-up might be responsible for the lost event. So I tried to comment-out the line "menu.setVisible(true);" in VisualizerView.showContextMenu(). Then obviously the context menu does not show when right-clicking, but both mouse events are sent. So the conclusion is that it seems that the context menu being made visible interferes with the mouseUp event.
Here is a tentative Patch for this bug: https://git.eclipse.org/r/12237 It's very simple and works-around the issue of the missing mouseUp event by making the drag-detection logic of MouseMonitor not apply for a right-click. Bill, what do you think? Regards, Marc
w/r to the patch submitted in this bug, I declare the following: 1) that I am authorized to submit this code change 2) that the code is 100% my own work Marc Dumais
The patch has been merged.