Skip to main content



      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 18:03 Go to next message
Eclipse UserFriend
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 00:49 Go to previous messageGo to next message
Eclipse UserFriend
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 11:36 Go to previous message
Eclipse UserFriend
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: Thu May 08 21:25:58 EDT 2025

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

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

Back to the top