Component (JList<? extends SidePanelItem> list, SidePanelItem value, int index, boolean isSelected, boolean cellHasFocus) { layout(); myCountLabel.setText(""); Component component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if ("Problems".equals(descriptor.getTextFor(value))) { final ErrorPaneConfigurable errorPane = (ErrorPaneConfigurable)value.myPlace.getPath("category"); int errorsCount; if (errorPane != null && (errorsCount = errorPane.getErrorsCount()) > 0) { myCountLabel.setSelected(isSelected); myCountLabel.setText(errorsCount > 100 ? "100+" : String.valueOf(errorsCount)); } } if (ClientProperty.isTrue(list, ExpandableItemsHandler.EXPANDED_RENDERER)) { Rectangle bounds = list.getCellBounds(index, index); bounds.setSize((int)component.getPreferredSize().getWidth(), (int)bounds.getHeight()); AbstractExpandableItemsHandler.setRelativeBounds(component, bounds, myExtraPanel, myValidationParent); myExtraPanel.setSize((int)myExtraPanel.getPreferredSize().getWidth(), myExtraPanel.getHeight()); myExtraPanel.putClientProperty(ExpandableItemsHandler.USE_RENDERER_BOUNDS, true); return myExtraPanel; } return component; }