public HierarchyTreeStructure compute() {
final Project project = getProject();
final List<DartComponentName> dartComponentNames =
DartClassIndex.getItemsByName(className, project, GlobalSearchScope.projectScope(project));
for (DartComponentName name : dartComponentNames) {
DartClass dartClass = PsiTreeUtil.getParentOfType(name, DartClass.class);
if (dartClass != null && dartClass.getName().equals(className)) {
if (subtype) {
return new DartTypeHierarchyTreeStructure(project, dartClass, HierarchyBrowserBaseEx.SCOPE_PROJECT);
}
else {
return new DartSupertypesHierarchyTreeStructure(project, dartClass);