[jbosstools-commits] JBoss Tools SVN: r39334 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Wed Mar 7 08:36:36 EST 2012


Author: jgargula
Date: 2012-03-07 08:36:34 -0500 (Wed, 07 Mar 2012)
New Revision: 39334

Modified:
   trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java
Log:
Fixed condition for disposed widget.


Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java	2012-03-07 11:53:30 UTC (rev 39333)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java	2012-03-07 13:36:34 UTC (rev 39334)
@@ -244,13 +244,8 @@
 
         for (int i = 0; i <= ATTEMPTS_TIMEOUT; i++) {
             for (SWTBotShell shell : shells()) {
-                try {
-                    if (shellTitle.equals(shell.getText())) {
-                        return shell;
-                    }
-                } catch (WidgetNotFoundException wnfe) {
-                    log.info("Waiting for shell: " + wnfe.getMessage());
-                    // do nothing more but continue in loop
+                if (!shell.widget.isDisposed() && shellTitle.equals(shell.getText())) {
+                    return shell;
                 }
             }
             if (i < ATTEMPTS_TIMEOUT) {



More information about the jbosstools-commits mailing list