ITextSelection ts= (ITextSelection)selection; result= new SearchPatternData(TYPE, REFERENCES, ts.getText(), null);
BufferedReader reader= new BufferedReader(new StringReader(((ITextSelection)selection).getText())); String text; try { text= reader.readLine(); } catch (IOException ex) { text= ""; } result= new SearchPatternData(TYPE, REFERENCES, text, null);
	private SearchPatternData trySimpleTextSelection(ISelection selection) {		SearchPatternData result= null;		if (selection instanceof ITextSelection) {			ITextSelection ts= (ITextSelection)selection;			result= new SearchPatternData(TYPE, REFERENCES, ts.getText(), null);		}		return result;	}