Component (JList<?> list, Object obj, int index, boolean isSelected, boolean cellHasFocus) { if (panel.isDisposed()) { // Don't create new NavBarItem if panel is disposed. See: IDEA-306495 //noinspection MissingAccessibleContext return new SelectablePanel(); } SelectablePanel selectable = null; for (SelectablePanel cachedSelectable : selectables) { NavBarItem item = unwrapItem(cachedSelectable); if (obj == item.getObject()) { item.update(); selectable = cachedSelectable; } } if (selectable == null) { selectable = SelectablePanel.wrap(new NavBarItem(panel, obj, null, true)); if (ExperimentalUI.isNewUI()) { selectable.setSelectionArc(JBUI.CurrentTheme.Popup.Selection.ARC.get()); } selectables.add(selectable); } selectable.setBackground(null); selectable.setSelectionColor(isSelected ? UIUtil.getListSelectionBackground(cellHasFocus) : null); return selectable; }