refactor [collab]: prioritize the full name in chooser popup

GitOrigin-RevId: 7a35fc1aa6f04a9fc941f439c862a2d37c155966
This commit is contained in:
Ivan Semenov
2026-02-13 14:11:17 +00:00
committed by intellij-monorepo-bot
parent 12151a13f7
commit e98a86b400
@@ -25,11 +25,13 @@ class SimplePopupItemRenderer<T> private constructor(private val presenter: (T)
override fun customizeCellRenderer(list: JList<out T>, value: T, index: Int, selected: Boolean, hasFocus: Boolean) {
val presentation = presenter(value)
icon = presentation.icon
append(presentation.shortText)
val fullText = presentation.fullText
if (fullText != null) {
append(fullText)
append(" ")
append(fullText, SimpleTextAttributes.GRAYED_ATTRIBUTES)
append(presentation.shortText, SimpleTextAttributes.GRAYED_ATTRIBUTES)
} else {
append(presentation.shortText)
}
// ColoredListCellRenderer sets null for a background in case of !selected, so it can't work with SelectablePanel