Author: vpakan(a)redhat.com
Date: 2009-12-11 09:15:30 -0500 (Fri, 11 Dec 2009)
New Revision: 19207
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java
Log:
Fix error when simulating Mouse Right Click on Empty Tree View.
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java 2009-12-11
14:14:08 UTC (rev 19206)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java 2009-12-11
14:15:30 UTC (rev 19207)
@@ -145,7 +145,11 @@
* @param tree
*/
public static void prepareTreeItemForContextMenu(SWTBotTree tree){
+
tree.setFocus();
- tree.select(0);
+ if (tree.getAllItems().length > 0){
+ tree.select(0);
+ }
+
}
}
Show replies by date