Bug 15301 'show in packages view' - does not work fo java files not in source folders
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
if (e instanceof IJavaElement)	
					converted.add(e);
				else if (e instanceof IResource) {
					IJavaElement element= JavaCore.create((IResource)e);
					if (element != null) 
						converted.add(element);
					else 
						converted.add(e);
				}
			}
		}
		return new StructuredSelection(converted.toArray());
	}
	
	public void selectAndReveal(Object element) {
		selectReveal(new StructuredSelection(element));
	}
	
	/**
	 * Returns whether the preference to link selection to active editor is enabled.
	 */
	boolean isLinkingEnabled() {
		return JavaBasePreferencePage.linkPackageSelectionToEditor();
	}
	/**
	 * Links to editor (if option enabled)
	 */
	private void linkToEditor(IStructuredSelection selection) {	
		Object obj= selection.getFirstElement();
		Object element= null;