*
* @author Andreas Br�ker
* @date 12.07.2006
*/
protected SearchScope buildSearchScope() {
SearchScope scope = null;
switch(searchPageContainer.getSelectedScope()) {
case ISearchPageContainer.SELECTION_SCOPE:
scope = getSelectedResourcesScope();
break;
case ISearchPageContainer.WORKING_SET_SCOPE:
IWorkingSet[] workingSets = searchPageContainer.getSelectedWorkingSets();
String description = Messages.OfficeSearchPage_searchScopre_description_workingSets;
scope = SearchScope.newSearchScope(description, workingSets);
break;
default:
scope = SearchScope.newWorkspaceScope();
}
scope.addFileNamePatterns(getFileNamePatterns());
scope.addFileExtensions(getFileExtensions());
return scope;
}