Bug 31865 Package Explorer: Cannot search for references in workspace
Build 20030213 1. Create class X with method foo 2. In Package Explorer, select foo 3. Right click, select References in the pop up menu Observe: The sub-menu contains only working sets. The other entries (Workspace, Hierarchy, Working Set...) have disappeared.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemTableViewer.java
if (selectedElements == null || selectedElements.isEmpty())
			return selection;
		boolean selectionChanged= false;
		List validElementsToSelect= new ArrayList(selectedElements.size());
		Iterator iter= selectedElements.iterator();
		while (iter.hasNext()) {
			Object element= iter.next();
			if (element instanceof IJavaElement) {
				IJavaElement je= (IJavaElement)element;
				if (je != null && je.exists()) 
					validElementsToSelect.add(je);
				else
					selectionChanged= true;
			} else {
				validElementsToSelect.add(element);
			}
		}
		if (selectionChanged)
			return new StructuredSelection(validElementsToSelect);
		else
			return selection;
	}
	/**
	 * Converts a working copy (element) to a cu (element)
	 * or vice-versa.
	 * 
	 * @return the converted Java element or <code>null</code> if the conversion fails
	 */
	private IJavaElement convertToValidElement(IJavaElement je) {
		ICompilationUnit cu= (ICompilationUnit)je.getAncestor(IJavaElement.COMPILATION_UNIT);