protected @Nullable String itemToText(int index, E value) {
    ListCellRenderer<? super E> renderer = getCellRenderer();
    Component c = renderer == null ? null : renderer.getListCellRendererComponent(this, value, index, true, true);
    if (c != null) {
      c = ExpandedItemRendererComponentWrapper.unwrap(c);
    }

    if (c instanceof KotlinUIDslRendererComponent uiDslRendererComponent) {
      return uiDslRendererComponent.getCopyText();
    }

    SimpleColoredComponent coloredComponent = null;
    if (c instanceof JComponent) {
      coloredComponent = UIUtil.findComponentOfType((JComponent)c, SimpleColoredComponent.class);
    }
    return coloredComponent != null ? coloredComponent.getCharSequence(true).toString() :
           c instanceof JTextComponent ? ((JTextComponent)c).getText() :
           c instanceof JLabel ? ((JLabel)c).getText() :
           value != null ? value.toString() : null;
  }
protected @Nullable String itemToText(int index, E value)