in intellij/src/main/kotlin/motif/intellij/ScopeHierarchyUtils.kt [97:110]
fun getParentScopes(
project: Project,
graph: ResolvedGraph,
element: PsiClass,
): Array<ScopeEdge>? {
val scopeType: PsiType = PsiElementFactory.SERVICE.getInstance(project).createType(element)
val type: IrType = IntelliJType(project, scopeType)
val scope: Scope? = graph.getScope(type)
return if (scope != null) {
Iterables.toArray(graph.getParentEdges(scope), ScopeEdge::class.java) as Array<ScopeEdge>?
} else {
null
}
}