@Override
  public Component getListCellRendererComponent(JList list, Object value, int index, boolean sel, boolean focus) {
    final BorderLayout layout = new BorderLayout();
    layout.setHgap(5);
    final JPanel panel = new JPanel(layout);
    panel.setOpaque(true);

    final Color bg = sel ? UIUtil.getListSelectionBackground(true) : UIUtil.getListBackground();
    final Color fg;
    fg = sel ? NamedColorUtil.getListSelectionForeground(true) : UIUtil.getListForeground();
    panel.setBackground(bg);
    panel.setForeground(fg);
    if (value instanceof InspectionElement) {
      final InspectionToolWrapper toolWrapper = ((InspectionElement)value).getToolWrapper();
      final String inspectionName = "  " + toolWrapper.getDisplayName();
      final String groupName = StringUtil.join(toolWrapper.getGroupPath(), " | ");
      final String matchingText = inspectionName + "|" + groupName;
      Matcher matcher = MatcherHolder.getAssociatedMatcher(list);
      List<TextRange> fragments = matcher == null ? null : ((MinusculeMatcher)matcher).matchingFragments(matchingText);
      List<TextRange> adjustedFragments = new ArrayList<>();
      if (fragments != null) {
        adjustedFragments.addAll(fragments);
      }
      final int splitPoint = adjustRanges(adjustedFragments, inspectionName.length() + 1);
      final SimpleColoredComponent c = new SimpleColoredComponent();
      final boolean matchHighlighting = Registry.is("ide.highlight.match.in.selected.only") && !sel;
      if (matchHighlighting) {
        c.append(inspectionName, myPlain);
      }
      else {
        final List<TextRange> ranges = adjustedFragments.subList(0, splitPoint);
        SpeedSearchUtil.appendColoredFragments(c, inspectionName, ranges, sel ? mySelected : myPlain, myHighlighted);
      }
      panel.add(c, BorderLayout.WEST);

      final SimpleColoredComponent group = new SimpleColoredComponent();
      if (matchHighlighting) {
        group.append(groupName, SimpleTextAttributes.GRAYED_ATTRIBUTES);
      }
      else {
        final SimpleTextAttributes attributes = sel ? mySelected : SimpleTextAttributes.GRAYED_ATTRIBUTES;
        final List<TextRange> ranges = adjustedFragments.subList(splitPoint, adjustedFragments.size());
        SpeedSearchUtil.appendColoredFragments(group, groupName, ranges, attributes, myHighlighted);
      }
      final JPanel right = new JPanel(new BorderLayout());
      right.setBackground(bg);
      right.setForeground(fg);
      right.add(group, BorderLayout.CENTER);
      final JLabel icon = new JLabel(getIcon(toolWrapper));
      icon.setBackground(bg);
      icon.setForeground(fg);
      right.add(icon, BorderLayout.EAST);
      panel.add(right, BorderLayout.EAST);
    }
    else {
      // E.g. "..." item
      return super.getListCellRendererComponent(list, value, index, sel, focus);
    }

    return panel;
  }
@Override
  public Component getListCellRendererComponent(JList list, Object value, int index, boolean sel, boolean focus)