Bug 8581 Switch J Search to StructuredContentProvider
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaElementAction.java
if (elements != null && elements.length > 0) {
				if (elements.length == 1 || !shouldUserBePrompted())
					return elements[0];
				else if (elements.length > 1)
					return chooseFromList(elements);
			}
		}
		return null;
	}
	public ISelection getSelection() {
		IWorkbenchWindow window= JavaPlugin.getActiveWorkbenchWindow();
		if (window != null)
			return window.getSelectionService().getSelection();
		else
			return TextSelection.emptySelection();
	}
	protected ICodeAssist getCodeAssist(IEditorPart editorPart) {
		IEditorInput input= editorPart.getEditorInput();
		if (input instanceof IClassFileEditorInput)
			return ((IClassFileEditorInput)input).getClassFile();
		IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();				
		return manager.getWorkingCopy(input);
	}
	private IJavaElement chooseFromList(IJavaElement[] openChoices) {
		int flags= JavaElementLabelProvider.SHOW_DEFAULT | JavaElementLabelProvider.SHOW_QUALIFIED;
		ILabelProvider labelProvider= new JavaElementLabelProvider(flags);
		ElementListSelectionDialog dialog= new ElementListSelectionDialog(JavaPlugin.getActiveWorkbenchShell(), labelProvider);
		dialog.setTitle(SearchMessages.getString("SearchElementSelectionDialog.title")); 
		dialog.setMessage(SearchMessages.getString("SearchElementSelectionDialog.message")); 
		dialog.setElements(openChoices);