swtbot: Fix time graph item bounds and menu detect event coordinates
authorPatrick Tasse <patrick.tasse@gmail.com>
Tue, 20 Dec 2016 19:04:20 +0000 (14:04 -0500)
committerPatrick Tasse <patrick.tasse@gmail.com>
Fri, 27 Jan 2017 19:28:44 +0000 (14:28 -0500)
commitb52c0cb351af227ff2330707ae2780e1250c9f20
treedffb64358e2ea11fe30e469445cc861bd3c1f09a
parenteefa5914aa465f0ef164ae6f21dc0d048b03be2d
swtbot: Fix time graph item bounds and menu detect event coordinates

The method TimeGraphControl.getItemBounds(ITimeGraphEntry) should return
bounds relative to the item's parent, e.g. the time graph control, not
its parent.

The method SWTBotTimeGraphEntry.contextMenu(Control) should fire a
SWT.MenuDetect event where the coordinates are relative to the display.
The item should also be selected after firing the SWT.MenuDetect event
but before firing the SWT.Show menu event.

The method SWTBotTimeGraphEntry.select() should replace the selection
with the selected item, not add it to the selection. It should also fire
a SelectionEvent and a SelectionChangedEvent.

Change-Id: I5743af433c51b97255aafb0ce433d69069858e50
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/87498
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/shared/org/eclipse/tracecompass/tmf/ui/swtbot/tests/shared/SWTBotTimeGraphEntry.java
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java
This page took 0.024973 seconds and 5 git commands to generate.