Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369005

Summary: [TMF] Incorrect context menu in events table in Linux
Product: z_Archived Reporter: Patrick Tasse <patrick.tasse>
Component: LinuxToolsAssignee: Francois Chouinard <fchouinard>
Status: CLOSED FIXED QA Contact: Francois Chouinard <fchouinard>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:

Description Patrick Tasse CLA 2012-01-18 15:45:16 EST
In TmfEventsTable the context menu when the user right-clicks in the left margin shows different actions whether the selected item has a bookmark set or not.

The selected item is determined using the current cursor location coordinates. These coordinates are relative to the top left corner of the table, including the header row.

However, in Linux the Table method getItem(Point p) expects a point with coordinates relative to the top left corner of the first table item (excluding the header row) whereas in Windows the coordinates must be relative to the top left corner of the header row.

The current implementation doesn't take this OS-dependent behavior into account, so in Linux the context menu is populated using the wrong table item.

The TableItem method getImageBounds(int index) shows the same OS-dependent behavior.

The solution is to determine the table item for the context menu based on the table selection instead of the cursor coordinates, and to ignore the y coordinates of the image bounds. This makes the implementation of the context menu OS-independent.
Comment 1 Patrick Tasse CLA 2012-01-18 15:50:04 EST
Pushed to master branch.

commit 0b69b605a7a4c41bbf5820b27927a8125940a0cb
Comment 2 Francois Chouinard CLA 2012-03-26 14:07:33 EDT
Delivered in 0.10.0