Bug 5793 Searching and search result presentation
I should be able to tell search whether it should consider potential matcher or not. Often I use search for references as the peer operation to open on selection, i.e., e.g., I know there is exactly one caller and I want to jump to it. In addition, potential matches should be presented at the end of the result list and not at it's beginning.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultLabelProvider.java
} catch (CoreException ex) {
				ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.javaElementAccess.title"), SearchMessages.getString("Search.Error.javaElementAccess.message")); 
				handle= null;
			}
			
			if (handle != null)	
				fLastJavaElement= JavaCore.create(handle);
			else
				fLastJavaElement= null;
			fLastMarker= marker;
		}
		return fLastJavaElement;
	}
	
	private boolean handleContainsWrongCU(String handle, String resourceName) {
		int start= handle.indexOf('{');
		int end= handle.indexOf(".java"); 
		if (start >= end || start == -1)
			return false;
		String name= handle.substring(start + 1, end + 5);
		return !name.equals(resourceName);
	}
	
	private String computeFixedHandle(String handle, String resourceName) {
		int start= handle.indexOf('{');
		int end= handle.indexOf(".java"); 
		handle= handle.substring(0, start + 1) + resourceName + handle.substring(end + 5);
		return handle;
	}
}