[jbosstools-commits] JBoss Tools SVN: r43960 - trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Sep 24 09:16:48 EDT 2012


Author: ljelinko
Date: 2012-09-24 09:16:48 -0400 (Mon, 24 Sep 2012)
New Revision: 43960

Modified:
   trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java
Log:
Fixed wrong adding of path

Modified: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java	2012-09-24 12:06:28 UTC (rev 43959)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java	2012-09-24 13:16:48 UTC (rev 43960)
@@ -16,56 +16,50 @@
 	public void open(){
 		open("JBoss Tools", "JBoss Tools Runtime Detection");
 	}
-	
+
 	public SearchingForRuntimesDialog addPath(final String path){
-		UIThreadRunnable.syncExec(new VoidResult() {
-			
-			@Override
-			public void run() {
-				RuntimeUIActivator.getDefault().getModel().addRuntimePath(new RuntimePath(path));
-			}
-		});
-		
-		SWTBotFactory.getBot().button("OK").click();
+		RuntimeUIActivator.getDefault().getModel().addRuntimePath(new RuntimePath(path));
+
+		SWTBotFactory.getBot().button("Cancel").click();
 		open();
 		return new SearchingForRuntimesDialog();
 	}
-	
+
 	public void removePath(final String path){
 		SWTBotFactory.getBot().table().click(0, 0);
 		SWTBotFactory.getBot().button("Remove").click();
 	}
-	
+
 	public void removeAllPaths(){
 		SWTBot bot = SWTBotFactory.getBot();
 		SWTBotTable table = bot.table();
-		
+
 		int pathsNumber = table.rowCount();
 		for (int i = 0; i < pathsNumber; i++){
 			table.click(0, 0);
 			bot.button("Remove").click();
 		}
 	}
-	
+
 	public SearchingForRuntimesDialog search(){
 		SWTBotFactory.getBot().button("Search...").click();
 		SWTBot bot = SWTBotFactory.getBot().shell("Searching for runtimes...").bot();
 		bot.waitUntil(new RuntimeSearchedFinished(bot), TaskDuration.LONG.getTimeout());
 		return new SearchingForRuntimesDialog();
 	}
-	
+
 	private static class RuntimeSearchedFinished implements ICondition {
 
 		private SWTBot bot;
-		
+
 		public RuntimeSearchedFinished(SWTBot bot) {
 			this.bot = bot;
 		}
-		
+
 		@Override
 		public void init(SWTBot bot) {
 		}
-		
+
 		@Override
 		public boolean test() throws Exception {
 			try {



More information about the jbosstools-commits mailing list