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
/**
	 * Adds additional listeners to this view.
	 * This method can be overridden but should
	 * call super.
	 */
	protected void hookViewerListeners() {
		fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
			public void selectionChanged(SelectionChangedEvent event) {
				if (!fProcessSelectionEvents)
					return;
				fPreviousSelectedElement= getSingleElementFromSelection(event.getSelection());
				IWorkbenchPage page= getSite().getPage();
				if (page == null)
					return;
				if (page.equals(JavaPlugin.getActivePage()) && JavaBrowsingPart.this.equals(page.getActivePart())) {
					linkToEditor((IStructuredSelection)event.getSelection());
				}
			}
		});
		fViewer.addOpenListener(new IOpenListener() {
			public void open(OpenEvent event) {
				IAction open= fOpenEditorGroup.getOpenAction();
				if (open.isEnabled()) {
					open.run();
					restoreSelection();
				}
			}
		});
	}
	void restoreSelection() {