failed chaining of select(String) [message #479382] |
Mon, 10 August 2009 15:33  |
Eclipse User |
|
|
|
I see that the code for select("String") forwarding the operation to code
that selects a group of nodes, but unfortunately doesn't return the single
selected item in this case as the SWTBotTreeItem, so it fails to chain in
the below example, while the getTreeItem("String") works as expected.
bot.tree().expandNode("C1").select("Debug").expand(); // fails to expand
Debug bot.tree().expandNode("C1").getTreeItem("Debug").expand(); // works
|
|
|
|
|
Re: failed chaining of select(String) [message #479654 is a reply to message #479438] |
Tue, 11 August 2009 16:59  |
Eclipse User |
|
|
|
I suppose getting back an array of selected objects would be the expected
thing for multiple selections, and getting back a single one would return
a single object, but then the functions would need different names.
Maybe someone had a reason for the operation to select two children
sequentially?
expandNode("a").select("a.1").select("a.2")
You have a second form selects both children at the same time while the
first version selects one, then selects the second and clears selection on
the first.
expandNode("a").select("a.1","a.2");
It isn't really clear to me what all the requirements are. If you are
trying to provide support for gui recording, perhaps there should be
available api to do the equivalent of the gui actions for ctrl-select and
shift-select.
select("a.1").shiftSelect("a.2");
and
select("a.1").ctrlSelect("a.2");
|
|
|
Powered by
FUDForum. Page generated in 0.04034 seconds