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
Object result= item.getData();
			if (result == null)
				return null;
			return result;
		}
		protected Widget internalGetWidgetToSelect(Object element) {
			Widget result= findItem(element);
			if (!(result instanceof TreeItem))
				return result;
			if (isInHistroyWorkingSet((TreeItem)result)) {
				List l= (List)fAdditionalMappings.get(element);
				if (l != null && !l.isEmpty()) {
					return (Widget)l.get(0);
				} else {
					
					
					return null;
				}
			}
			return result;
		}
		private boolean isInHistroyWorkingSet(TreeItem item) {
			TreeItem parent= item.getParentItem();
			while (parent != null) {
				Object data= getElement(parent);
				if (data instanceof IWorkingSet && HistoryWorkingSetUpdater.ID.equals(((IWorkingSet)data).getId()))
					return true;
				parent= parent.getParentItem();
			}
			return false;