@Override
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean hasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, hasFocus);
if (value instanceof SonarProject) {
SonarProject project=(SonarProject) value;
label.setText(String.format("%s (%s)", project.getName(), project.getKey()));
}
return label;
}