Bug 30291 SearchUsagesInFileAction should show dialog in case of failures
Build I20030122 SearchUsagesInFileAction should show a dialog in failure/error cases (e.g. code resolve fails).
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchUsagesInFileAction.java
new SearchUsagesInFileLabelProvider(),
				new GotoMarkerAction(), 
				new SearchGroupByKeyComputer(),
				fNullOperation
			);	
		return view;
	}
	
	public String getPluralLabel(String nodeContents, String elementName) {
		String[] args= new String[] {nodeContents, "{0}", elementName}; 
		return SearchMessages.getFormattedString("JavaSearchInFile.pluralPostfix", args); 
	}
	
	public String getSingularLabel(String nodeContents, String elementName) {
		String[] args= new String[] {nodeContents, elementName}; 
		return SearchMessages.getFormattedString("JavaSearchInFile.singularPostfix", args); 
	}
	public void addMatch(final ISearchResultView view, IResource file, IMarker marker) {
		if (view != null)
			view.addMatch("", getGroupByKey(marker), file, marker); 
	}
	
	private Object getGroupByKey(IMarker marker) {
		try {
			return marker.getAttribute(IMarker.LINE_NUMBER);
		} catch (CoreException e) {
		}
		return marker;
	}