Bug 61198 References in Project: Title shows wrong project
I200405060200 1. in the Java editor select a type from project A which comes not from the same project as the opened file (project B). 2. search for refs in project ==> title says project A, matches are from B
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchScopeFactory.java
addJavaElements(javaElements, workingSet);
		return createJavaSearchScope(javaElements, includeJRE);
	}
	public IJavaSearchScope createJavaSearchScope(IResource[] resources, boolean includeJRE) {
		if (resources == null)
			return EMPTY_SCOPE;
		Set javaElements= new HashSet(resources.length);
		addJavaElements(javaElements, resources);
		return createJavaSearchScope(javaElements, includeJRE);
	}
	
	public IJavaSearchScope createJavaSearchScope(ISelection selection, boolean includeJRE) {
		return createJavaSearchScope(getJavaElements(selection), includeJRE);
	}
	
	private IJavaSearchScope internalCreateProjectScope(ISelection selection, boolean includeJRE) {
		Set javaProjects= getJavaProjects(selection);
		return createJavaSearchScope(javaProjects, includeJRE);
	}
	
	public IJavaSearchScope createJavaProjectSearchScope(IJavaElement selection, boolean includeJRE) {
		return createJavaProjectSearchScope(new StructuredSelection(selection), includeJRE);
	}
	
	public IJavaSearchScope createJavaProjectSearchScope(ISelection selection, boolean includeJRE) {
		IEditorInput input= getActiveEditorInput();
		if (input != null)
			return JavaSearchScopeFactory.getInstance().internalCreateProjectScope(input, includeJRE);
		return internalCreateProjectScope(selection, includeJRE);