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
return element.getJavaProject().getProject();
	}
	
	private IMarker createMarker(IResource file, ASTNode element, boolean writeAccess, boolean isVariable) throws CoreException {
		Map attributes= new HashMap(10);
		IMarker marker= file.createMarker(SearchUI.SEARCH_MARKER);
		int startPosition= element.getStartPosition();
		MarkerUtilities.setCharStart(attributes, startPosition);
		MarkerUtilities.setCharEnd(attributes, startPosition + element.getLength());
		
		
		if (!(file instanceof IFile)) {
			attributes.put(IWorkbenchPage.EDITOR_ID_ATTR, JavaUI.ID_CF_EDITOR);
			JavaCore.addJavaElementMarkerAttributes(attributes, getClassFile().getType());
			attributes.put(IJavaSearchUIConstants.ATT_JE_HANDLE_ID, getClassFile().getType().getHandleIdentifier());
		}
		if(writeAccess)
			attributes.put(IS_WRITEACCESS, new Boolean(true));
		if(isVariable)
			attributes.put(IS_VARIABLE, new Boolean(true));
			
		IDocument document= getDocument();
		try {
			int line= document.getLineOfOffset(startPosition);
			MarkerUtilities.setLineNumber(attributes, line);
			IRegion region= document.getLineInformation(line);
			String lineContents= document.get(region.getOffset(), region.getLength());
			MarkerUtilities.setMessage(attributes, lineContents.trim());
		} catch (BadLocationException e) {
		}