Bug 62968 Source folders disappear in Package Explorer if set to Hierarchical Layout
I200405190010 If I set the view to "Hierarchical Layout" in the Package Explorer my "src" folder shows as empty if there are no java files in the root package (i.e. only sub-packages at the first level). Setting to "Flat" and they appear again. Tried a new Java project to recreate, but the problem is not showing on new projects. PB
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
IJavaElement jElement= JavaCore.create((IResource)o);
					if (jElement != null && jElement.exists()) 
						elements[i]= jElement;
				}
				else if (o instanceof IAdaptable) {
					IResource r= (IResource)((IAdaptable)o).getAdapter(IResource.class);
					if (r != null) {
						IJavaElement jElement= JavaCore.create(r);
						if (jElement != null && jElement.exists()) 
							elements[i]= jElement;
						else
							elements[i]= r;
					}
				}
			}
		}
		
		return new StructuredSelection(elements);
	}
	
	private boolean containsResources(Object[] elements) {
		for (int i = 0; i < elements.length; i++) {
			Object o= elements[i];
			if (!(o instanceof IJavaElement)) {
				if (o instanceof IResource)
					return true;
				if ((o instanceof IAdaptable) && ((IAdaptable)o).getAdapter(IResource.class) != null)
					return true;
				}
		}