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
}
				} else
					list.add(object);
			}
			return list.toArray();
		}
		
		
		private Object filter(Object object, Object parent, ViewerFilter[] filters) {
			for (int i = 0; i < filters.length; i++) {
				ViewerFilter filter = filters[i];
				if (!filter.select(fViewer, parent, object))
					return null;
			}
			return object;
		}
	
		/* Checks if a filtered object in essential (ie. is a parent that
		 * should not be removed).
		 */ 
		private boolean isEssential(Object object) {
			try {
				if (!isFlatLayout() && object instanceof IPackageFragment) {
					IPackageFragment fragment = (IPackageFragment) object;
					return !fragment.isDefaultPackage() && fragment.hasSubpackages();
				}
			} catch (JavaModelException e) {
				JavaPlugin.log(e);
			}
			return false;