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/internal/ui/search/JavaSearchResultLabelProvider.java
}
		if (javaElement instanceof IImportDeclaration)
			javaElement= ((IImportDeclaration)javaElement).getParent().getParent();
		String text= ""; 
		if (isPotentialMatch) 
			text= fLabelProvider.getText(javaElement) + POTENTIAL_MATCH;
		else
			text= fLabelProvider.getText(javaElement);
		if (fDecorator != null) {
			String decoratedText= fDecorator.decorateText(text, javaElement);
			if (decoratedText != null)
				return decoratedText;
		}
		return text;
	}
	public Image getImage(Object o) {
		IJavaElement javaElement= getJavaElement(o);
		if (javaElement == null)
			return JavaPluginImages.get(JavaPluginImages.IMG_OBJS_UNKNOWN);
		Image image= fLabelProvider.getImage(javaElement);
		if (image == null)
			return JavaPluginImages.get(JavaPluginImages.IMG_OBJS_UNKNOWN);
		
		if (fDecorator != null) {
			Image decoratedImage= fDecorator.decorateImage(image, javaElement);
			if (decoratedImage != null)
				return decoratedImage;
		}
		return image;
	}