Bug 10577 Java Search: search scope "Selected resource" not working
Switch to new StructuredSelectionProvider intruduced this bug a) because the provider does not do code resolve if the input is not a selection service b) because at the time the selection service is asked for the selection it takes the selection form the newly opened Search view
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
}
	}
	private void handlePatternSelected() {
		if (fPattern.getSelectionIndex() < 0)
			return;
		int index= fgPreviousSearchPatterns.size() - 1 - fPattern.getSelectionIndex();
		fInitialData= (SearchPatternData) fgPreviousSearchPatterns.get(index);
		for (int i= 0; i < fSearchFor.length; i++)
			fSearchFor[i].setSelection(false);
		for (int i= 0; i < fLimitTo.length; i++)
			fLimitTo[i].setSelection(false);
		fSearchFor[fInitialData.searchFor].setSelection(true);
		setLimitTo(fInitialData.searchFor);
		fLimitTo[fInitialData.limitTo].setSelection(true);
		fPattern.setText(fInitialData.pattern);
		fIsCaseSensitive= fInitialData.isCaseSensitive;
		fJavaElement= fInitialData.javaElement;
		fCaseSensitive.setEnabled(fJavaElement == null);
		fCaseSensitive.setSelection(fInitialData.isCaseSensitive);
		if (fInitialData.workingSet != null)
			getContainer().setSelectedWorkingSet(fInitialData.workingSet);
		else
			getContainer().setSelectedScope(fInitialData.scope);
	}
	private Control createSearchFor(Composite parent) {
		Group result= new Group(parent, SWT.NONE);
		result.setText(SearchMessages.getString("SearchPage.searchFor.label")); 
		GridLayout layout= new GridLayout();
		layout.numColumns= 3;
		result.setLayout(layout);