use of com.jetbrains.lang.dart.ide.hierarchy.type.DartServerTypeHierarchyTreeStructure in project intellij-plugins by JetBrains.
the class DartTypeHierarchyTest method doDartTypeHierarchyTest.
private void doDartTypeHierarchyTest(final String className, final boolean subtype, final String... fileNames) throws Exception {
doHierarchyTest(() -> {
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 DartServerTypeHierarchyTreeStructure(project, dartClass, HierarchyBrowserBaseEx.SCOPE_PROJECT);
} else {
return new DartServerSupertypesHierarchyTreeStructure(project, dartClass);
}
}
}
return null;
}, fileNames);
}
Aggregations