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

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Wed Oct 19 08:39:25 EDT 2011


Author: lzoubek at redhat.com
Date: 2011-10-19 08:39:25 -0400 (Wed, 19 Oct 2011)
New Revision: 35802

Modified:
   trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java
   trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java
Log:
botext: moved disabling autofocusing console to StartServer req

Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java	2011-10-19 12:31:12 UTC (rev 35801)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java	2011-10-19 12:39:25 UTC (rev 35802)
@@ -30,15 +30,6 @@
 			public String getName() {
 				return IDELabel.View.WELCOME;
 			}});
-		
-		// force console view not to steal focus when something happens
-		try {
-		SWTBotView consoleView = SWTTestExt.console.show();
-		consoleView.toolbarToggleButton(IDELabel.ConsoleView.BUTTON_SHOW_WHEN_STDOUT_CHANGES_TOOLTIP).deselect();
-		consoleView.toolbarToggleButton(IDELabel.ConsoleView.BUTTON_SHOW_WHEN_STDERR_CHANGES_TOOLTIP).deselect();
-		} catch (Exception ex) {
-			// do nothing since buttons must not always be available 
-		}
 		SWTTestExt.configuredState.setViewsPrepared(true);
 
 	}

Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java	2011-10-19 12:31:12 UTC (rev 35801)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java	2011-10-19 12:39:25 UTC (rev 35802)
@@ -1,30 +1,47 @@
 package org.jboss.tools.ui.bot.ext.config.requirement;
 
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
 import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+
 /**
  * Starts server (as dependent requirement has {@link AddServer}
+ * 
  * @author lzoubek
- *
+ * 
  */
 public class StartServer extends RequirementBase {
 
 	public StartServer() {
-		// define dependency				
+		// define dependency
 		getDependsOn().add(createAddServer());
 	}
-	
+
 	@Override
 	public boolean checkFulfilled() {
 		return SWTTestExt.configuredState.getServer().isRunning;
 	}
 
 	@Override
-	public void handle(){
-	  if (!checkFulfilled()){
-		  String server = SWTTestExt.configuredState.getServer().name;
-		  String user = SWTTestExt.configuredState.getRemoteSystem().remoteUser;		  
-		  SWTTestExt.servers.startServer(server,user,null);
-		  SWTTestExt.configuredState.getServer().isRunning = true;
-	  }
+	public void handle() {
+		if (!checkFulfilled()) {
+			String server = SWTTestExt.configuredState.getServer().name;
+			String user = SWTTestExt.configuredState.getRemoteSystem().remoteUser;
+			SWTTestExt.servers.startServer(server, user, null);
+			SWTTestExt.configuredState.getServer().isRunning = true;
+			// force console view not to steal focus when something happens on server
+			try {
+				SWTBotView consoleView = SWTTestExt.console.show();
+				consoleView
+						.toolbarToggleButton(
+								IDELabel.ConsoleView.BUTTON_SHOW_WHEN_STDOUT_CHANGES_TOOLTIP)
+						.deselect();
+				consoleView
+						.toolbarToggleButton(
+								IDELabel.ConsoleView.BUTTON_SHOW_WHEN_STDERR_CHANGES_TOOLTIP)
+						.deselect();
+			} catch (Exception ex) {
+			}
+		}
 	}
 }



More information about the jbosstools-commits mailing list