Bug 45448 Operation unavailable attempting to search a local variable [search]
Build 20031023 Selecting a local variable declaration in a Java editor and attempting to search for references to this local variable brings up a dialog saying the the operation is unavailable for the selected element.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindAction.java
return getJavaElement((IStructuredSelection)o, silent);
		else if (SearchUtil.isISearchResultViewEntry(o))
			return getJavaElement(SearchUtil.getJavaElement(o), silent);
		return null;
	}
	IJavaElement getJavaElement(IStructuredSelection selection, boolean silent) {
		if (selection.size() == 1)
			
			return getJavaElement(selection.getFirstElement(), silent);
		return null;
	}
	private void showOperationUnavailableDialog() {
		MessageDialog.openInformation(getShell(), SearchMessages.getString("JavaElementAction.operationUnavailable.title"), getOperationUnavailableMessage()); 
	}	
	String getOperationUnavailableMessage() {
		return SearchMessages.getString("JavaElementAction.operationUnavailable.generic"); 
	}
	private IJavaElement findType(ICompilationUnit cu, boolean silent) {
		IType[] types= null;
		try {					
			types= cu.getAllTypes();
		} catch (JavaModelException ex) {
			
			ExceptionHandler.log(ex, SearchMessages.getString("JavaElementAction.error.open.message")); 
			if (silent)
				return RETURN_WITHOUT_BEEP;
			else
				return null;
		}
		if (types.length == 1 || (silent && types.length > 0))