Bug 30412 ClassCastException selecting package in java browsing perspective
Build: I20030122 I have the java browsing perspective open. I selected a package in the packages view, and there was an error trying to open the type browsing view. I can't seem to reproduce it, but hopefully the stack trace will be useful. The result was that the types view could not be initialized (the view contained an error message saying it could not be created.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
private void saveSelectionState(IMemento memento) {
		Object elements[]= ((IStructuredSelection) fViewer.getSelection()).toArray();
		if (elements.length > 0) {
			IMemento selectionMem= memento.createChild(TAG_SELECTED_ELEMENTS);
			for (int i= 0; i < elements.length; i++) {
				IMemento elementMem= selectionMem.createChild(TAG_SELECTED_ELEMENT);
				
				Object o= elements[i];
				if (o instanceof IJavaElement)
					elementMem.putString(TAG_SELECTED_ELEMENT_PATH, ((IJavaElement) elements[i]).getHandleIdentifier());
			}
		}
	}
	protected void restoreState(IMemento memento) {
		if (fHasWorkingSetFilter)
			fWorkingSetFilterActionGroup.restoreState(memento);
		if (fHasCustomFilter)
			fCustomFiltersActionGroup.restoreState(memento);
			
		if (fHasCustomFilter || fHasWorkingSetFilter) {
			fViewer.getControl().setRedraw(false);
			fViewer.refresh();
			fViewer.getControl().setRedraw(true);
		}
	}	
	private ISelection restoreSelectionState(IMemento memento) {
		if (memento == null)
			return null;
		
		IMemento childMem;