First of all, Hello everyone,
I need to test Drag and Drop function in a RCP application using SWTBot. The following simulates a DnD operation between two SWTBotTreeItems:
bot.activeShell().bot().tree(0).getTreeItem(obj1).dragAndDrop(obj2);
with obj1 being the element to be dragged from the source tree and obj2 an element of the target tree. obj1 is dropped at the absolute position of obj2. This code works fine if there is at least one TreeItem in each one of the trees.
However, dropping on a SWTBotTree itself (obj2 being a SWTBotTree in that case) doesn't work and will throw an UnsupportedOperationException.
Is there any way with SWTBot to test DnD on an empty tree? I want to avoid setting a dummy element in both trees to make DnD testing work.