aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/itmill/toolkit/demo/testbench/TestBench.java10
-rw-r--r--src/com/itmill/toolkit/tests/TestBench.java11
2 files changed, 12 insertions, 9 deletions
diff --git a/src/com/itmill/toolkit/demo/testbench/TestBench.java b/src/com/itmill/toolkit/demo/testbench/TestBench.java
index 8880525e55..c455dc72ae 100644
--- a/src/com/itmill/toolkit/demo/testbench/TestBench.java
+++ b/src/com/itmill/toolkit/demo/testbench/TestBench.java
@@ -88,11 +88,13 @@ public class TestBench extends com.itmill.toolkit.Application implements
for (Iterator i = itemCaptions.keySet().iterator(); i.hasNext();) {
Class testable = (Class) i.next();
// simplify captions
- String name = testable.getName().replaceAll("com.itmill.toolkit.",
- "");
+ String name = testable.getName().substring(
+ testable.getName().lastIndexOf('.') + 1);
menu.setItemCaption(testable, name);
- // TODO fix #1191
- menu.collapseItem(testable);
+ }
+ // expand all root items
+ for (Iterator i = menu.rootItemIds().iterator(); i.hasNext();) {
+ menu.expandItemsRecursively(i.next());
}
menu.addListener(this);
diff --git a/src/com/itmill/toolkit/tests/TestBench.java b/src/com/itmill/toolkit/tests/TestBench.java
index 76f1c119c5..48fd3cffe5 100644
--- a/src/com/itmill/toolkit/tests/TestBench.java
+++ b/src/com/itmill/toolkit/tests/TestBench.java
@@ -92,12 +92,13 @@ public class TestBench extends com.itmill.toolkit.Application implements
for (Iterator i = itemCaptions.keySet().iterator(); i.hasNext();) {
Class testable = (Class) i.next();
// simplify captions
- String name = testable.getName().replaceAll("com.itmill.toolkit.",
- "");
+ String name = testable.getName().substring(
+ testable.getName().lastIndexOf('.') + 1);
menu.setItemCaption(testable, name);
- // TODO fix #1191
- System.err.println(name);
- menu.collapseItem(testable);
+ }
+ // expand all root items
+ for (Iterator i = menu.rootItemIds().iterator(); i.hasNext();) {
+ menu.expandItemsRecursively(i.next());
}
menu.addListener(this);