Bug 41584 Search references not hitting build path for working set [search]
This happens in 3.0M2 If I'm searching for references of a method, I usually right click, Search->References->Workspace. However, with large workspaces, this can take pretty long, so I've gotten in the habit of searching for references within a working set. I usually define a workingset for each project and all its contents. The problem is, when I search for references of a method in the workingset, it does not find references to that symbol from the thirdparty jars I have attached to the project's build path (verified the jar is selected as part of the working set). However, if I search the workspace, it does find the references in that thirdparty jar. This is usually for a method defined in the thirdparty jar that I use, and want to see how it is used by the thirdparty.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchScopeFactory.java
private void addJavaElements(Set javaElements, IJavaProject javaProject) {
		IPackageFragmentRoot[] roots;
		try {
			roots= javaProject.getPackageFragmentRoots();
		} catch (JavaModelException ex) {
			return;
		}
		for (int i= 0; i < roots.length; i++)
			if (!roots[i].isExternal())
				javaElements.add(roots[i]);
	}
	private void addJavaElements(Set javaElements, IWorkingSet workingSet) {
		if (workingSet == null)
			return;
		
		IAdaptable[] elements= workingSet.getElements();
		for (int i= 0; i < elements.length; i++) {
			if (elements[i] instanceof IJavaElement)
				addJavaElements(javaElements, (IJavaElement)elements[i]);
			else
				addJavaElements(javaElements, elements[i]);
		}
	}
	public void addJavaElements(Set javaElements, LogicalPackage selectedElement) {
		IPackageFragment[] packages= selectedElement.getFragments();
		for (int i= 0; i < packages.length; i++)
			addJavaElements(javaElements, packages[i]);
	}
}