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
}
		return firstElement;
	}
	/**
	 * Gets the typeComparator.
	 * @return Returns a JavaElementTypeComparator
	 */
	protected Comparator getTypeComparator() {
		return fTypeComparator;
	}
	/**
	 * Links to editor (if option enabled)
	 */
	private void linkToEditor(IStructuredSelection selection) {	
		Object obj= selection.getFirstElement();
		if (selection.size() == 1) {
			IEditorPart part= EditorUtility.isOpenInEditor(obj);
			if (part != null) {
				IWorkbenchPage page= getSite().getPage();
				page.bringToTop(part);
				if (obj instanceof IJavaElement) 
					EditorUtility.revealInEditor(part, (IJavaElement) obj);
			}
		}
	}
	private void setSelectionFromEditor(IWorkbenchPartReference ref) {
			IWorkbenchPart part= ref.getPart(false);
			setSelectionFromEditor(part);
	}
	void setSelectionFromEditor(IWorkbenchPart part) {