override fun updateText()

in android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibViewNodeDescriptor.kt [44:63]


  override fun updateText(text: CompositeAppearance) {
    if (ribView == null) {
      return
    }
    text.ending.addText(RibHierarchyUtils.formatSimpleName(ribView.name))

    val boldFont = TextAttributes(myColor, null, null, null, Font.BOLD)
    if (ribView.layoutId.isNotEmpty()) {
      text.ending.addText(" [layout/${ribView.layoutId}.xml]", boldFont)
    } else if (ribView.viewId.isNotEmpty()) {
      text.ending.addText(" [id/${ribView.viewId}]", boldFont)
    }

    if (ribView.name.isNotEmpty()) {
      text.ending.addText(
        " (${RibHierarchyUtils.formatQualifiedName(ribView.name)})",
        getPackageNameAttributes(),
      )
    }
  }