boolean (ColoredListCellRenderer renderer, JList list, Object value, TextAttributes attributes) { if (!(value instanceof NavigationItem item)) return false; SimpleTextAttributes nameAttributes = attributes != null ? SimpleTextAttributes.fromTextAttributes(attributes) : null; Color color = list.getForeground(); if (nameAttributes == null) nameAttributes = new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, color); ItemPresentation presentation = Objects.requireNonNull(item.getPresentation()); renderer.append(presentation.getPresentableText() + " ", nameAttributes); renderer.setIcon(presentation.getIcon(true)); String locationString = presentation.getLocationString(); if (!StringUtil.isEmpty(locationString)) { renderer.append(locationString, new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, JBColor.GRAY)); } return true; }