override fun update()

in intellij/src/main/kotlin/motif/intellij/actions/MotifAncestorGraphAction.kt [66:75]


  override fun update(e: AnActionEvent) {
    val project = e.project ?: return
    val graph = this.graph ?: return
    val element: PsiElement? = e.getPsiElement()
    e.presentation.isEnabled =
        element is PsiClass &&
            isMotifScopeClass(element) &&
            (!isInitializedGraph(graph) ||
                (getParentScopes(project, graph, element)?.isNotEmpty() == true))
  }