Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » select a tree node and its child
select a tree node and its child [message #44637] Tue, 21 July 2009 22:03 Go to next message
Will Horn is currently offline Will HornFriend
Messages: 265
Registered: July 2009
Senior Member
Node
+ Leaf

bot.tree().select("Node", "Leaf"); // only selects "Node"

bot.tree().select("Node"); bot.tree().getTreeItem("Node").select("Leaf"); //
only selects "Leaf"

Any way to add to the current selection without deselecting the rest (like a
Ctrl+Click)?

Thanks,
Will
Re: select a tree node and its child [message #44668 is a reply to message #44637] Wed, 22 July 2009 04:49 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
Trees again :(

I'd prefer an API like the following:

tree.select("foo", "bar>baz", "bar>boo");

For this to work, swtbot needs to get away from the and node().node()
way working and provide a better alternative.

There's also another alternative

tree.selectWithoutResettingExistingSelection("foo");
tree.selectWithoutResettingExistingSelection("bar>baz");
tree.selectWithoutResettingExistingSelection("bar>boo");

Of course the methods could be named better :)

--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr

On 22/7/09 03:33, Will Horn wrote:
> Node
> + Leaf
>
> bot.tree().select("Node", "Leaf"); // only selects "Node"
>
> bot.tree().select("Node");
> bot.tree().getTreeItem("Node").select("Leaf"); // only selects "Leaf"
>
> Any way to add to the current selection without deselecting the rest
> (like a Ctrl+Click)?
>
> Thanks,
> Will
Re: select a tree node and its child [message #44876 is a reply to message #44668] Wed, 22 July 2009 15:36 Go to previous message
Derek  is currently offline Derek Friend
Messages: 30
Registered: July 2009
Member
Ketan Padegaonkar wrote:

> Trees again :(

> I'd prefer an API like the following:
> tree.select("foo", "bar>baz", "bar>boo");

That would be handy with it like that :)


> For this to work, swtbot needs to get away from the and node().node()
> way working and provide a better alternative.

> There's also another alternative
> tree.selectWithoutResettingExistingSelection("foo");
> tree.selectWithoutResettingExistingSelection("bar>baz");
> tree.selectWithoutResettingExistingSelection("bar>boo");

> Of course the methods could be named better :)


Maybe named something like "select" for one item, and selecting more
"selectAdd". Just a thought:

tree.select("foo");
tree.selectAdd("bar>baz");
tree.selectAdd("bar>boo");
Previous Topic:SWTBot and context menus
Next Topic:How to test the ControlDecoration?
Goto Forum:
  


Current Time: Wed Oct 04 14:38:14 GMT 2023

Powered by FUDForum. Page generated in 0.02198 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top