SWTBot cannot copy/paste on tree items using keyboard shortcuts [message #1384853] |
Mon, 02 June 2014 10:16  |
Eclipse User |
|
|
|
Hi,
I want to copy/paste between two SWTBotTreeItem using CTRL+C/CTRL+V. Using copy/paste with the context menu works well, but I am required to use keyboard shortcuts too. The following code doesn't work: I can't copy the first node.
SWTBotTreeItem node1 = parentNode.getNode(name1);
SWTBotTreeItem node2 = parentNode.getNode(name2);
node1.select().pressShortcut(SWT.CTRL, 'C');
node2.select().pressShortcut(SWT.CTRL, 'V');
Even if I use 'copy' on node1 via the contextMenu, pressing CTRL+V on node2 does nothing.
I would like to understand what mistake I've done when using the pressShortcut.
|
|
|
Re: SWTBot cannot copy/paste on tree items using keyboard shortcuts [message #1384945 is a reply to message #1384853] |
Tue, 03 June 2014 05:06   |
Eclipse User |
|
|
|
On 02/06/2014 16:38, David CHAUDET wrote:
> Hi,
>
> I want to copy/paste between two SWTBotTreeItem using CTRL+C/CTRL+V.
> Using copy/paste with the context menu works well, but I am required to
> use keyboard shortcuts too. The following code doesn't work: I can't
> copy the first node.
>
> SWTBotTreeItem node1 = parentNode.getNode(name1);
> SWTBotTreeItem node2 = parentNode.getNode(name2);
> node1.select().pressShortcut(SWT.CTRL, 'C');
> node2.select().pressShortcut(SWT.CTRL, 'V');
>
> Even if I use 'copy' on node1 via the contextMenu, pressing CTRL+V on
> node2 does nothing.
>
> I would like to understand what mistake I've done when using the
> pressShortcut.
>
Which operating system are you using? I have a few problems with
testing keyboard shortcuts in Linux KDE: to avoid these issues I run
swtbot tests on another display (see the wiki) and use metacity as the
window manager in the other display.
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.30606 seconds