@Override
    protected ListCellRenderer<?> getListElementRenderer() {
      //noinspection unchecked
      ListCellRenderer<Object> renderer = (ListCellRenderer<Object>)super.getListElementRenderer();
      return (list, value, index, isSelected, cellHasFocus) -> {
        if (value instanceof PopupFactoryImpl.ActionItem item) {
          AnAction action = item.getAction();
          Presentation presentation = myPresentationFactory.getPresentation(action);
          //noinspection DialogTitleCapitalization
          String text = item.getText();
          //noinspection DialogTitleCapitalization
          String secondText = presentation.getClientProperty(LastAction.SECOND_TEXT);
          if (secondText != null) {
            JBLabel label = new JBLabel(presentation.getIcon());
            label.setBorder(JBUI.Borders.emptyRight(JBUI.CurrentTheme.ActionsList.elementIconGap() - 2));

            JPanel panel = new OpaquePanel(new BorderLayout(), isSelected
                                                               ? JBUI.CurrentTheme.ManagedIde.MENU_ITEM_HOVER
                                                               : JBUI.CurrentTheme.Advertiser.background()) {
              @Override
              public AccessibleContext getAccessibleContext() {
                return label.getAccessibleContext();
              }
            };

            float leftRightInset = JBUI.CurrentTheme.Popup.Selection.LEFT_RIGHT_INSET.getUnscaled();
            Insets innerInsets = ((JBInsets)JBUI.CurrentTheme.Popup.Selection.innerInsets()).getUnscaled();
            panel.setBorder(JBUI.Borders.empty(12, (int)(leftRightInset + innerInsets.left), 12, 14));

            JPanel iconPanel = new NonOpaquePanel(new BorderLayout());
            iconPanel.add(label, BorderLayout.NORTH);
            panel.add(iconPanel, BorderLayout.WEST);

            JPanel lines = new NonOpaquePanel(new BorderLayout(0, JBUI.scale(2)));
            lines.add(new JBLabel(text), BorderLayout.NORTH);

            JLabel secondLine = new JBLabel(secondText);
            secondLine.setForeground(JBUI.CurrentTheme.Advertiser.foreground());
            lines.add(secondLine, BorderLayout.SOUTH);

            panel.add(lines);

            if (index > 0) {
              //noinspection unchecked
              PopupFactoryImpl.ActionItem prevIndex =
                ((ListPopupStep<PopupFactoryImpl.ActionItem>)getStep()).getValues().get(index - 1);
              AnAction prevAction = prevIndex.getAction();
              if (!(prevAction instanceof LastAction)) {
                JPanel wrapper = new OpaquePanel(new BorderLayout(), list.getBackground()) {
                  @Override
                  public AccessibleContext getAccessibleContext() {
                    return label.getAccessibleContext();
                  }
                };
                wrapper.setBorder(JBUI.Borders.emptyTop(JBUI.CurrentTheme.Popup.bodyBottomInsetNoAd()));
                wrapper.add(panel);
                return wrapper;
              }
            }

            return panel;
          }
        }
        return renderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
      };
    }
@Override
    protected ListCellRenderer<?> getListElementRenderer()