SearchPatternData values= null; values= tryTypedTextSelection(selection); if (values == null) values= trySelection(selection); if (values == null) values= trySimpleTextSelection(selection); if (values == null) values= getDefaultInitValues();  fSearchFor[values.searchFor].setSelection(true); setLimitTo(values.searchFor); fLimitTo[values.limitTo].setSelection(true); fInitialPattern= values.pattern; fPattern.setText(fInitialPattern); fJavaElement= values.javaElement;
fInitialData= null; fInitialData= tryTypedTextSelection(selection); if (fInitialData == null) fInitialData= trySelection(selection); if (fInitialData == null) fInitialData= trySimpleTextSelection(selection); if (fInitialData == null) fInitialData= getDefaultInitValues();  fJavaElement= fInitialData.javaElement; fCaseSensitive.setSelection(fInitialData.isCaseSensitive); fCaseSensitive.setEnabled(fInitialData.javaElement == null); fSearchFor[fInitialData.searchFor].setSelection(true); setLimitTo(fInitialData.searchFor); fLimitTo[fInitialData.limitTo].setSelection(true); fPattern.setText(fInitialData.pattern);
	private void initSelections() {		fJavaElement= null;		ISelection selection= getSelection();		SearchPatternData values= null;		values= tryTypedTextSelection(selection);		if (values == null)			values= trySelection(selection);		if (values == null)			values= trySimpleTextSelection(selection);		if (values == null)			values= getDefaultInitValues();							fSearchFor[values.searchFor].setSelection(true);		setLimitTo(values.searchFor);		fLimitTo[values.limitTo].setSelection(true);				fInitialPattern= values.pattern;		fPattern.setText(fInitialPattern);		fJavaElement= values.javaElement;	}