Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362172 - Drag and Drop operation fails in tree for nodes which have to be scrolled to
Summary: Drag and Drop operation fails in tree for nodes which have to be scrolled to
Status: CLOSED FIXED
Alias: None
Product: Jubula
Classification: Technology
Component: Core (show other bugs)
Version: 1.0.0   Edit
Hardware: All All
: P3 blocker (vote)
Target Milestone: Juno M6   Edit
Assignee: Zeb Ford-Reitz CLA
QA Contact: Oliver Goetz CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-27 05:59 EDT by Oliver Goetz CLA
Modified: 2012-02-23 03:55 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Goetz CLA 2011-10-27 05:59:42 EDT
I have a TC that performs a Drag and Drop action in a tree (TSB). This action fails if the view including the tree is so small that it gets a scroll bar. Even if the node where the drop action is performed is visible the drop is performed on the initial node, the action is reported as successful but the following check fails. When the window is maximized and the view is big enough so it does not have a scroll bar the DnD is performed right.
Comment 1 Oliver Goetz CLA 2011-10-27 06:20:00 EDT
The component where the action is performed is a ScrolledComposite.
Comment 2 Oliver Goetz CLA 2011-11-10 05:48:45 EST
This also happens in TCB, in our nightly tests the error did only occur on windows (XP, Vista, 7). I created a test case for this ticket and moved it into windows broken TS. Furthermore I´m increasing the priority to blocker since this error occurs now in nightly tests.
Comment 3 Zeb Ford-Reitz CLA 2011-11-11 10:19:23 EST
It looks like Jubula performs some scrolling during the drag and drop. Since the drag and drop is performed entirely within a single Display.syncExec() call, the drop and the scrolling do not play nicely together. The end result is that the drop occurs on the wrong element.

The solution is to split the drag and the drop operations into two separate Display.syncExec() calls. The problem with that so far has been that triggering the drag operation seems to block the UI thread, blocking further calls to Display.syncExec() until some other event occurs (e.g. the physical mouse is moved).

I tried posting some MouseMove events between the separated Display.syncExec() calls, and the results look promising.
Comment 4 Zeb Ford-Reitz CLA 2011-11-15 05:48:29 EST
http://git.eclipse.org/c/jubula/org.eclipse.jubula.core.git/commit/?id=6e831c36940ef46f4d7a25f99751dabd78157157 fixes the problem when dropping on Tree nodes.
Comment 5 Zeb Ford-Reitz CLA 2011-11-25 07:40:41 EST
http://git.eclipse.org/c/jubula/org.eclipse.jubula.core.git/commit/?id=a1e7828cf273b634b8457e0c65ccea6fabf9e8af contains additional fixes for this bug.

I suspect that the timing problem that was causing the bug was a combination of constrained resources of a virtual machine, a relatively large tree, and non-trival logic in the drop operation.
Comment 6 Oliver Goetz CLA 2011-12-06 03:26:45 EST
This error does not occur anymore in our nightly tests so I´m closing this ticket as fixed.