Component ( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus ) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); @NlsSafe String text = ((KotlinGenerateToStringAction.Generator) value).getText(); setText(text); return this; }