Bug 103505 [browsing] Java Browser will not enable viewing Hierarchy for package in >1 folder
1. Consider workspace/proj/src/test/com/a and workspace/proj/src/test/com/a If com.a is viwed in the PackageExplorer the View Hierarchy options works fine. If one goes the the Java Browsing perspective and selects the proj then "a" shows up in the packages, but the View Hierarchy option is unavailable. 2. In general, why can't one open the Hiearchy View on any aggregate: project, folder or package, or group of packages. (If one opens on a Project the results are bizarre-in my case I see mostly interfaces, and certainly not all classes).
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenTypeHierarchyAction.java
elem= elem.getJavaProject().findType(elem.getElementName());
					}
					if (elem != null) {
						result.add(elem);
						return ok;
					}
					return createStatus(ActionMessages.OpenTypeHierarchyAction_messages_unknown_import_decl);
				case IJavaElement.CLASS_FILE:
					result.add(((IClassFile)elem).getType());
					return ok;				
				case IJavaElement.COMPILATION_UNIT:
					ICompilationUnit cu= (ICompilationUnit)elem;
					IType[] types= cu.getTypes();
					if (types.length > 0) {
						result.addAll(Arrays.asList(types));
						return ok;
					}
					return createStatus(ActionMessages.OpenTypeHierarchyAction_messages_no_types); 
			}
		} catch (JavaModelException e) {
			return e.getStatus();
		}
		return createStatus(ActionMessages.OpenTypeHierarchyAction_messages_no_valid_java_element); 
	}
	
	private static IStatus createStatus(String message) {
		return new Status(IStatus.INFO, JavaPlugin.getPluginId(), IJavaStatusConstants.INTERNAL_ERROR, message, null);
	}			
}