/**
* @param matcher a matcher.
* @return a widget within the parent widget that matches the specified matcher.
*/
protected <S extends Widget> List<? extends S> findWidgets(Matcher<S> matcher) {
Finder finder = bot.getFinder();
Control control = getControl();
boolean shouldFindInvisibleControls = finder.shouldFindInvisibleControls();
finder.setShouldFindInvisibleControls(true);
try {
return bot.widgets(matcher, control);
} catch (Exception e) {
throw new WidgetNotFoundException("Could not find any control inside the view " + partReference.getPartName(), e); //$NON-NLS-1$
} finally {
finder.setShouldFindInvisibleControls(shouldFindInvisibleControls);
}
}