Bug 8581 Switch J Search to StructuredContentProvider
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaElementAction.java
return null;
	}
	private IJavaElement getJavaElement(ISearchResultViewEntry entry, boolean silent) {
		if (entry != null)
			return getJavaElement(entry.getSelectedMarker(), silent);
		return null;
	}
	private IJavaElement getJavaElement(IStructuredSelection selection, boolean silent) {
		if (selection.size() == 1)
			
			return getJavaElement(selection.getFirstElement(), silent);
		return null;
	}
	protected IJavaElement getJavaElement(ITextSelection selection) {
		IWorkbenchPage wbPage= JavaPlugin.getActivePage();
		if (wbPage == null)
			return null;
		IEditorPart editorPart= wbPage.getActiveEditor();
		if (editorPart == null)
			return null;
		ICodeAssist assist= getCodeAssist(editorPart);
		ITextSelection ts= (ITextSelection) selection;
		if (assist != null) {
			IJavaElement[] elements;
			try {
				elements= assist.codeSelect(ts.getOffset(), ts.getLength());
			} catch (JavaModelException ex) {
				ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createJavaElement.title"), SearchMessages.getString("Search.Error.createJavaElement.message")); 
				return null;
			}