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
IStructuredSelection structSel= (IStructuredSelection)invalidSelection;
				List elementsToSelect= new ArrayList(structSel.size());
				Iterator iter= structSel.iterator();
				while (iter.hasNext()) {
					Object element= iter.next();
					if (element instanceof IJavaElement) {
						IJavaElement je= convertToValidElement((IJavaElement)element);
						if (je != null)
							elementsToSelect.add(je);
					}
				}
				if (!elementsToSelect.isEmpty()) {
					List alreadySelected= SelectionUtil.toList(validNewSelection);
					if (alreadySelected != null && !alreadySelected.isEmpty())
						elementsToSelect.addAll(SelectionUtil.toList(validNewSelection));
					validNewSelection= new StructuredSelection(elementsToSelect);
				}
			}
		}
		if (validNewSelection != newSelection)
			setSelection(validNewSelection);
		super.handleInvalidSelection(invalidSelection, validNewSelection);
	}
	/*
	 * Returns a selection which does not contain non-existing
	 * Java elements. If all elements are ok then the original
	 * selection is returned unchanged.
	 */
	private ISelection getValidSelection(ISelection selection) {
		List selectedElements= SelectionUtil.toList(selection);