Author: ljelinko
Date: 2012-01-24 09:34:35 -0500 (Tue, 24 Jan 2012)
New Revision: 38086
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/debug/PrintWidgetsTask.java
Log:
Print also tree's items
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/debug/PrintWidgetsTask.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/debug/PrintWidgetsTask.java 2012-01-24
14:33:57 UTC (rev 38085)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/debug/PrintWidgetsTask.java 2012-01-24
14:34:35 UTC (rev 38086)
@@ -32,6 +32,8 @@
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.swt.widgets.Widget;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.eclipse.ui.forms.widgets.Hyperlink;
import org.hamcrest.Matcher;
import org.jboss.tools.portlet.ui.bot.task.AbstractSWTTask;
@@ -222,7 +224,12 @@
protected void visitTree(Tree widget) {
stream.print("Tree {");
stream.print(widget.getItemCount() + " item(s), ");
- stream.print(widget.getColumnCount() + " columns(s)");
+ stream.print(widget.getColumnCount() + " columns(s), ");
+ stream.print("items = {");
+ for (SWTBotTreeItem item : new SWTBotTree(widget).getAllItems()){
+ stream.print(item.getText() + ", ");
+ }
+ stream.print("}");
stream.println("}");
}
Show replies by date