I will take a look at that and post a patch. First I have to find a way to
automate setting text in a table cell with a table editor. If I find a solution
for that, it could be used for other widget types in cells too.
--- On Mon, 10/13/08, Ketan Padegaonkar <[EMAIL PROTECTED]> wrote:
From: Ketan Padegaonkar <[EMAIL PROTECTED]>
Subject: Re: [SWTBot-users] Suggestion for performance
To: swtbot-users@lists.sourceforge.net
Date: Monday, October 13, 2008, 1:19 PM
Already taken care of in 2.0 in lot more than one places. I'm sure
there are more places where this kind of optimization will help.
The one you point is a very small case, and I'm sure there are others,
in trees for e.g.
Could you file a patch similar to any of these ?
http://swtbot.svn.sourceforge.net/viewvc/swtbot/branches/java-1.5-api-spike/net.sf.swtbot.finder/src/net/sf/swtbot/wait/WaitForWidget.java?view=markup
http://swtbot.svn.sourceforge.net/viewvc/swtbot/branches/java-1.5-api-spike/net.sf.swtbot.finder/src/net/sf/swtbot/wait/WaitForWidgetInParent.java?view=markup
-- Ketan
On 13-Oct-08, at 9:57 PM, Hans Schwaebli wrote:
> SWTBot runs very fast, but I have seen a piece of code, where time
> is lost.
>
> public SWTBotTableItem getTableItem(final String itemText)
> throws WidgetNotFoundException {
> try {
> new SWTBot().waitUntil(new DefaultCondition() {
> public String getFailureMessage() {
> return "Could not find node with text " +
> itemText;
> }
>
> public boolean test() throws Exception {
> return getItem(itemText) != null;
> }
> });
> } catch (TimeoutException e) {
> throw new WidgetNotFoundException("Timed out waiting for
> table item " + itemText, e);
> }
> return new SWTBotTableItem(getItem(itemText));
> }
>
> The method getItem(itemText) is called twice. Once for determining
> whether the widget exists and again for returning the widget.
>
> I suggest that the waitUnit(...) method returns the widget if it
> finds it, so it does not need to be searched again.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
SWTBot-users mailing list
SWTBot-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
SWTBot-users mailing list
SWTBot-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse