Bug 106737 [package explorer] PackageExplorerPart select & reveal should adapt to IJavaElement
The select and reveal code in PackageExplorerPart Show In functionality should allow for adapting the selection element to IJavaElement. Currently it expects the selection to be an IJavaElement or adaptable to IResource. It should also check if its adaptable to IJavaElement. This is blocking us from supporting the Show In ... Package Explorer functionality for our editor.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
if (activePage == null)
			return null;
		IViewPart view= activePage.findView(VIEW_ID);
		if (view instanceof PackageExplorerPart)
			return (PackageExplorerPart)view;
		return null;	
	}
	
	/**
	 * Makes the package explorer part visible in the active perspective. If there
	 * isn't a package explorer part registered <code>null</code> is returned.
	 * Otherwise the opened view part is returned.
	 */
	public static PackageExplorerPart openInActivePerspective() {
		try {
			return (PackageExplorerPart)JavaPlugin.getActivePage().showView(VIEW_ID);
		} catch(PartInitException pe) {
			return null;
		}
	} 
		
	 public void dispose() {
		if (fContextMenu != null && !fContextMenu.isDisposed())
			fContextMenu.dispose();
		getSite().getPage().removePartListener(fPartListener);
		JavaPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
		if (fViewer != null) {
			fViewer.removeTreeListener(fExpansionListener);
			XMLMemento memento= XMLMemento.createWriteRoot("packageexplorer"); 
			saveState(memento);