[jbosstools-commits] JBoss Tools SVN: r42946 - 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
Thu Aug 9 06:18:42 EDT 2012


Author: jpeterka
Date: 2012-08-09 06:18:42 -0400 (Thu, 09 Aug 2012)
New Revision: 42946

Modified:
   trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
Log:
closeAllEditors method updated to fix trouble when no editor is available on indigo

Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java	2012-08-09 10:13:17 UTC (rev 42945)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java	2012-08-09 10:18:42 UTC (rev 42946)
@@ -1603,12 +1603,17 @@
      * Closes all opened editors.
      */
     public void closeAllEditors() {
+    	if (bot.editors().size() == 0) {
+    		log.info("No editors to close, leaving action");
+    		return;
+    	}
+    	
         SWTBotMenu closeAllMenu = bot.menu(IDELabel.Menu.FILE).menu(IDELabel.Menu.CLOSE_ALL);
         if (closeAllMenu.isEnabled()) {
             closeAllMenu.click();
             log.info("All editors were closed");
         } else {
-            log.info("No editors to close");
+            log.info("Close all editors menu is disabled");
         }
     }
 



More information about the jbosstools-commits mailing list