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

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Jun 7 11:43:17 EDT 2012


Author: rhopp
Date: 2012-06-07 11:43:16 -0400 (Thu, 07 Jun 2012)
New Revision: 41776

Modified:
   trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java
Log:
Clicking to FormText in Centra has been broken. This repairs it.

Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java	2012-06-07 15:39:35 UTC (rev 41775)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java	2012-06-07 15:43:16 UTC (rev 41776)
@@ -2,12 +2,11 @@
 
 import java.lang.reflect.Field;
 
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Event;
 import org.eclipse.swtbot.swt.finder.ReferenceBy;
 import org.eclipse.swtbot.swt.finder.SWTBotWidget;
 import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
 import org.eclipse.swtbot.swt.finder.results.StringResult;
+import org.eclipse.swtbot.swt.finder.results.VoidResult;
 import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl;
 import org.eclipse.ui.forms.widgets.FormText;
 import org.eclipse.ui.internal.forms.widgets.FormTextModel;
@@ -36,8 +35,16 @@
 	}
 	
 	public AbstractSWTBotControl<FormText> click()  {
+		syncExec(new VoidResult() {
+			
+			@Override
+			public void run() {
+				click(widget.toDisplay(25,5).x, widget.toDisplay(25,5).y, true); //+20 is there because of icon
+			}
+		});
+		/*old version of click
 		setFocus();
-		keyboard().typeCharacter('\r');
+		keyboard().typeCharacter('\r');*/
 		return this;
 	}
 	



More information about the jbosstools-commits mailing list