@Override
  protected void customizeCellRenderer(@NotNull JList<? extends SdkListItem> list,
                                       @Nullable SdkListItem value,
                                       int index,
                                       boolean selected,
                                       boolean hasFocus) {
    setIcon(EMPTY_ICON);    // to fix vertical size
    getAccessibleContext().setAccessibleName(null);
    if (value instanceof InvalidSdkItem item) {
      String str = ProjectBundle.message("jdk.combo.box.invalid.item", item.sdkName);
      append(str, SimpleTextAttributes.ERROR_ATTRIBUTES);
    }
    else if (value instanceof ProjectSdkItem) {
      final Sdk sdk = myGetModel.produce().resolveProjectSdk();
      if (sdk != null) {
        setIcon(((SdkType)sdk.getSdkType()).getIcon());
        append(ProjectBundle.message("project.roots.project.jdk.inherited"), SimpleTextAttributes.REGULAR_ATTRIBUTES);
        append(" ");
        append(sdk.getName(), SimpleTextAttributes.GRAYED_ATTRIBUTES);
      }
      else {
        append(ProjectBundle.message("jdk.combo.box.project.item"), SimpleTextAttributes.ERROR_ATTRIBUTES);
      }
    }
    else if (value instanceof SuggestedItem item) {
      SdkType type = item.sdkType;
      String home = item.homePath;
      String version = item.version;

      Icon icon = type.getIcon();
      if (icon == null) icon = IconUtil.getAddIcon();
      setIcon(icon);
      append(presentDetectedSdkPath(home));
      append(" ");
      append(version, SimpleTextAttributes.GRAYED_ATTRIBUTES);
    }
    else if (value instanceof ActionItem item) {
      Presentation template = item.action.getTemplatePresentation();
      //this is a sub-menu item
      SdkType sdkType = item.action.getSdkType();
      if (item.group != null) {
        setIcon(switch (item.role) {
          case ADD -> {
            //we already have the (+) in the parent node, thus showing original icon
            Icon icon = sdkType.getIcon();
            yield icon != null ? icon : AllIcons.General.Add;
          }
          case DOWNLOAD -> template.getIcon();
        });
        append(item.action.getListSubItemText());
      }
      else {
        setIcon(template.getIcon());
        append(item.action.getListItemText());
      }
    }
    else if (value instanceof GroupItem item) {
      setIcon(item.icon);
      append(item.caption);
    }
    else if (value instanceof SdkItem) {
      Sdk sdk = ((SdkItem)value).sdk;
      SdkAppearanceService.getInstance()
        .forSdk(sdk, false, selected, false)
        .customize(this);

      String version = sdk.getVersionString();
      if (version == null) version = ((SdkType)sdk.getSdkType()).getPresentableName();
      append(" ");
      append(version, SimpleTextAttributes.GRAYED_ATTRIBUTES);
    }
    else if (value instanceof NoneSdkItem) {
      SdkAppearanceService.getInstance()
        .forNullSdk(selected)
        .customize(this);
      getAccessibleContext().setAccessibleName(ProjectBundle.message("jdk.combo.box.no.sdk.item.accessibility"));
      setIcon(null);
    }
    else if (value instanceof SdkReferenceItem item) {

      SdkAppearanceService.getInstance()
        .forSdk(item.sdkType, item.name, null, item.hasValidPath, false, selected)
        .customize(this);

      String version = item.versionString;
      if (version == null) version = item.sdkType.getPresentableName();
      append(" ");
      append(version, SimpleTextAttributes.GRAYED_ATTRIBUTES);
    }
    else {
      SdkAppearanceService.getInstance()
        .forNullSdk(selected)
        .customize(this);
    }
  }
@Override
  protected void customizeCellRenderer(@NotNull JList<? extends SdkListItem> list,
                                       @Nullable SdkListItem value,
                                       int index,
                                       boolean selected,
                                       boolean hasFocus)