List result= searchEngine.searchTypes(new ProgressMonitorDialog(getShell()), SearchEngine.createWorkspaceScope(), flags);
ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell()); final List result= searchEngine.searchTypes(dialog, SearchEngine.createWorkspaceScope(), flags); if (dialog.getReturnCode() == dialog.CANCEL) { getShell().getDisplay().asyncExec( new Runnable() { public void run() { cancelPressed(); } } ); return; }
	public void initializeTypeList() {		AllTypesSearchEngine searchEngine= new AllTypesSearchEngine(JavaPlugin.getWorkspace());		int flags= IJavaElementSearchConstants.CONSIDER_BINARIES |					IJavaElementSearchConstants.CONSIDER_CLASSES |					IJavaElementSearchConstants.CONSIDER_EXTERNAL_JARS;		List result= searchEngine.searchTypes(new ProgressMonitorDialog(getShell()), SearchEngine.createWorkspaceScope(), flags);		fFilterText.setText("*Exception*"); //$NON-NLS-1$		fTypeList.setElements(result.toArray()); // XXX inefficient		fTypeListInitialized= true;	}