scope= JavaSearchScopeFactory.getInstance().createJavaSearchScope(getContainer().getSelectedWorkingSets());
scope= JavaSearchScopeFactory.getInstance().createJavaSearchScope(getContainer().getSelectedWorkingSets(), includeJRE);
	private boolean performOldSearch() {		org.eclipse.search.ui.SearchUI.activateSearchResultView();		SearchPatternData data= getPatternData();		IWorkspace workspace= JavaPlugin.getWorkspace();		// Setup search scope		IJavaSearchScope scope= null;		String scopeDescription= ""; //$NON-NLS-1$		switch (getContainer().getSelectedScope()) {			case ISearchPageContainer.WORKSPACE_SCOPE:				scopeDescription= SearchMessages.getString("WorkspaceScope"); //$NON-NLS-1$				scope= SearchEngine.createWorkspaceScope();				break;			case ISearchPageContainer.SELECTION_SCOPE:				scopeDescription= SearchMessages.getString("SelectionScope"); //$NON-NLS-1$				scope= JavaSearchScopeFactory.getInstance().createJavaSearchScope(fStructuredSelection);				break;			case ISearchPageContainer.SELECTED_PROJECTS_SCOPE:				scope= JavaSearchScopeFactory.getInstance().createJavaProjectSearchScope(fStructuredSelection);				IProject[] projects= JavaSearchScopeFactory.getInstance().getProjects(scope);				if (projects.length > 1)					scopeDescription= SearchMessages.getFormattedString("EnclosingProjectsScope", projects[0].getName()); //$NON-NLS-1$				else if (projects.length == 1)					scopeDescription= SearchMessages.getFormattedString("EnclosingProjectScope", projects[0].getName()); //$NON-NLS-1$				else 					scopeDescription= SearchMessages.getFormattedString("EnclosingProjectScope", ""); //$NON-NLS-1$ //$NON-NLS-2$				break;			case ISearchPageContainer.WORKING_SET_SCOPE:				IWorkingSet[] workingSets= getContainer().getSelectedWorkingSets();				// should not happen - just to be sure				if (workingSets == null || workingSets.length < 1)					return false;				scopeDescription= SearchMessages.getFormattedString("WorkingSetScope", SearchUtil.toString(workingSets)); //$NON-NLS-1$				scope= JavaSearchScopeFactory.getInstance().createJavaSearchScope(getContainer().getSelectedWorkingSets());				SearchUtil.updateLRUWorkingSets(getContainer().getSelectedWorkingSets());		}				JavaSearchResultCollector collector= new JavaSearchResultCollector();		JavaSearchOperation op= null;		if (data.getJavaElement() != null && getPattern().equals(fInitialData.getPattern())) {			op= new JavaSearchOperation(workspace, data.getJavaElement(), data.getLimitTo(), scope, scopeDescription, collector);			if (data.getLimitTo() == IJavaSearchConstants.REFERENCES)				SearchUtil.warnIfBinaryConstant(data.getJavaElement(), getShell());		} else {			data.setJavaElement(null);			op= new JavaSearchOperation(workspace, data.getPattern(), data.isCaseSensitive(), data.getSearchFor(), data.getLimitTo(), scope, scopeDescription, collector);		}		Shell shell= getControl().getShell();		try {			getContainer().getRunnableContext().run(true, true, op);		} catch (InvocationTargetException ex) {			ExceptionHandler.handle(ex, shell, SearchMessages.getString("Search.Error.search.title"), SearchMessages.getString("Search.Error.search.message")); //$NON-NLS-2$ //$NON-NLS-1$			return false;		} catch (InterruptedException ex) {			return false;		}		return true;	}