matchingItems.add(item);
texts.add(text);
}
if (matchingItems.isEmpty())
throw new WidgetNotFoundException(
"Tree item element containg text \"" + searchText
+ "\" was not found. Existing tree items:\n"
+ StringUtils.join(texts, "\n"));
else if (matchingItems.size() > 1)
throw new WidgetNotFoundException(
"Tree item element containg text \""
+ searchText
+ "\" could not be uniquely identified. All tree items:\n"
+ StringUtils.join(texts, "\n"));