multiple selections from tree + context menu [message #42176] |
Tue, 07 July 2009 14:59  |
Eclipse User |
|
|
|
Quick functionality question.. is it possible to select several items from
a tree (similar to using ctrl+click on a keyboard) and then bring up the
context menu while the items are still selected:
eg:
item.select("ACT", "CL_SCHED", "DEPARTMENT", "EMP_PHOTO", "EMP_RESUME",
"EMPLOYEE");
item.contextMenu("Copy").click()
(When I do the above code, I got an error "menu not enabled".. seems like
I am bringing up the context menu in the wrong area? Thoughts?
|
|
|
|
Re: multiple selections from tree + context menu [message #747963 is a reply to message #42176] |
Mon, 24 October 2011 07:46  |
Eclipse User |
|
|
|
A simple workaround is to call the contextmenu over the entire tree, like this:
SWTBotTree tree = myView.bot().tree();
SWTBotTreeItem item= tree.expandNode("MyItem");
item.select("ACT", "CL_SCHED", "DEPARTMENT", "EMP_PHOTO", "EMP_RESUME", "EMPLOYEE");
tree.contextMenu("Copy").click();
This works for me.
|
|
|
Powered by
FUDForum. Page generated in 0.03752 seconds