/* (non-Javadoc) * @see org.eclipse.wst.jsdt.internal.ui.typehierarchy.TypeHierarchyContentProvider#getRootTypes(java.util.List) */ protected final void getRootTypes(List res) { ITypeHierarchy hierarchy = getHierarchy(); if (hierarchy != null) { IType input = hierarchy.getType(); if (input == null) { IType[] classes = hierarchy.getRootClasses(); for (int i = 0; i < classes.length; i++) { res.add(classes[i]); } } else { IType[] roots = hierarchy.getRootClasses(); for (int i = 0; i < roots.length; i++) { if (isObject(roots[i])) { res.add(roots[i]); return; } } res.addAll(Arrays.asList(roots)); // something wrong with the hierarchy } } }