@Override public boolean test() { items = table.getItems(); for (TableItem item : items) { if (!item.getSWTWidget().isDisposed() && matcher.matches(item.getText())) { item.select(); return true; } } return false; }
@Override public String description() { StringBuffer message = new StringBuffer(); message.append("an item matching ").append(matcher.toString()).append(" in\n"); for (TableItem item : items) { String text = null; if (!item.getSWTWidget().isDisposed()) { text = item.getText(); } message.append("\t").append(text).append("\n"); } return message.toString(); }