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
public void selectAndReveal(Object element) {
		selectReveal(new StructuredSelection(element));
	}
	
	boolean isLinkingEnabled() {
		return fLinkingEnabled;
	}
	
	/**
	 * Initializes the linking enabled setting from the preference store.
	 */
	private void initLinkingEnabled() {
		fLinkingEnabled= PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.LINK_PACKAGES_TO_EDITOR);
	}
	/**
	 * Links to editor (if option enabled)
	 */
	private void linkToEditor(IStructuredSelection selection) {
		
		
		if (!isActivePart())
			return;
		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);