Author: lzoubek(a)redhat.com
Date: 2011-02-24 10:55:42 -0500 (Thu, 24 Feb 2011)
New Revision: 29313
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/PropertiesView.java
Log:
swtbotext: added properties view
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/PropertiesView.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/PropertiesView.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/PropertiesView.java 2011-02-24
15:55:42 UTC (rev 29313)
@@ -0,0 +1,30 @@
+package org.jboss.tools.ui.bot.ext.view;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+
+public class PropertiesView extends ViewBase {
+ Logger log = Logger.getLogger(PropertiesView.class);
+ public PropertiesView() {
+ viewObject = ActionItem.View.GeneralProperties.LABEL;
+ }
+ public List<String> getPropertyKeys() {
+ List<String> list = new ArrayList<String>();
+ for (SWTBotTreeItem item : this.show().bot().tree().getAllItems()) {
+ list.add(item.cell(0));
+ }
+ return list;
+ }
+ public String getPropertyValue(String property) {
+ for (SWTBotTreeItem item : this.show().bot().tree().getAllItems()) {
+ if (item.cell(0).equals(property)) {
+ return item.cell(1);
+ }
+ }
+ return null;
+ }
+}
Show replies by date