Bug 5232 Java Search page not initialized correctly from Navigator
1. Open the Navigator 2. Select a .java file (that's on the classpath) 3. Open the Search dialog (Ctrl+H) 4. Press Search ==> Nothing found. It should give the same result(s) as if the .java file would be selected in the Packages view.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
for (int i= 0; i < fLimitTo.length; i++)
			fLimitTo[i].setSelection(false);
		fSearchFor[values.searchFor].setSelection(true);
		fLimitTo[values.limitTo].setSelection(true);
		fLimitTo[IMPLEMENTORS].setEnabled((values.searchFor == TYPE));
		fLimitTo[DECLARATIONS].setEnabled((values.searchFor != PACKAGE));
		fLimitTo[ALL_OCCURRENCES].setEnabled((values.searchFor != PACKAGE));				
		fInitialPattern= values.pattern;
		fPattern.setText(fInitialPattern);
		fJavaElement= values.javaElement;
		if (values.workingSet != null)
			getContainer().setSelectedWorkingSet(values.workingSet);
		else
			getContainer().setSelectedScope(values.scope);
	}
	private void handleSearchForSelected(boolean state) {
		boolean implState= fLimitTo[IMPLEMENTORS].getSelection();
		if (!state && implState) {
			fLimitTo[IMPLEMENTORS].setSelection(false);
			fLimitTo[REFERENCES].setSelection(true);
		}
		fLimitTo[IMPLEMENTORS].setEnabled(state);
		fJavaElement= null;
	}
		
	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;