Bug 31202 occurrences in file: shoul beep at me if cannot find anything
20030206 i should be beeped at if nothing is found (an invalid expression selected or sth) i never look at the status line status line message + beep = the way to go
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindOccurrencesInFileAction.java
protected void selectionChanged(ITextSelection selection) {
	}
	/* (non-JavaDoc)
	 * Method declared in SelectionDispatchAction.
	 */
	protected final void run(ITextSelection ts) {
		IJavaElement input= getEditorInput(fEditor);
		FindOccurrencesEngine engine= FindOccurrencesEngine.create(input);
		try {
			String result= engine.run(ts.getOffset(), ts.getLength());
			if (result != null)
				showMessage(fEditor, result);
		} catch (JavaModelException e) {
			JavaPlugin.log(e);
		}
	}
	private static IJavaElement getEditorInput(JavaEditor editor) {
		IEditorInput input= editor.getEditorInput();
		if (input instanceof IClassFileEditorInput)
			return ((IClassFileEditorInput)input).getClassFile();
		return  JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(editor.getEditorInput());
	} 
		
	private static void showMessage(JavaEditor editor, String msg) {
		IEditorStatusLine statusLine= (IEditorStatusLine) editor.getAdapter(IEditorStatusLine.class);
		if (statusLine != null) 
			statusLine.setMessage(true, msg, null); 
	}
}