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/ui/actions/ShowInPackageViewAction.java
protected void run(ITextSelection selection) {
		try {
			IJavaElement element= SelectionConverter.getElementAtOffset(fEditor);
			if (element != null)
				run(element);
		} catch (JavaModelException e) {
			JavaPlugin.log(e);
			String message= ActionMessages.getString("ShowInPackageViewAction.error.message"); 
			ErrorDialog.openError(getShell(), getDialogTitle(), message, e.getStatus());
		}	
	}
	
	/* (non-Javadoc)
	 * Method declared on SelectionDispatchAction.
	 */
	protected void run(IStructuredSelection selection) {
		if (!checkEnabled(selection))
			return;
		run((IJavaElement)selection.getFirstElement());
	}
	
	private void run(IJavaElement element) {
		if (element == null)
			return;
		boolean showMembers= JavaPlugin.getDefault().getPreferenceStore().getBoolean(JavaBasePreferencePage.SHOW_CU_CHILDREN);
		PackageExplorerPart view= PackageExplorerPart.openInActivePerspective();
		if (view != null) {
			Object selectedElement= element;
			if (showMembers) {
				view.selectReveal(new StructuredSelection(element));