* @param matcher the matcher that can match menus and menu items.
* @param recursive if set to <code>true</code>, will find sub-menus as well.
* @return The list of menus (IContributionItems) that match the matcher.
*/
public List findMenus(final IViewReference view, final IMatcher matcher, final boolean recursive) {
return UIThreadRunnable.syncExec(new ListResult() {
public List run() {
ViewPane viewPane = (ViewPane) ((WorkbenchPartReference) view).getPane();
MenuManager mgr = viewPane.getMenuManager();
List l = new ArrayList();