diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/LanguageLevelCombo.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/LanguageLevelCombo.java index 754ff85a574d..802a2b0edf8b 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/LanguageLevelCombo.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/LanguageLevelCombo.java @@ -20,7 +20,6 @@ import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import javax.swing.*; import java.text.MessageFormat; import java.util.Arrays; @@ -77,12 +76,6 @@ public abstract class LanguageLevelCombo extends ComboBox { } return null; } - - @Nullable - @Override - public Icon getIcon(Object value) { - return null; - } }); } diff --git a/platform/platform-impl/src/com/intellij/ui/GroupedComboBoxRenderer.kt b/platform/platform-impl/src/com/intellij/ui/GroupedComboBoxRenderer.kt index a9f71775dbb8..76972680fb27 100644 --- a/platform/platform-impl/src/com/intellij/ui/GroupedComboBoxRenderer.kt +++ b/platform/platform-impl/src/com/intellij/ui/GroupedComboBoxRenderer.kt @@ -34,12 +34,12 @@ abstract class GroupedComboBoxRenderer(private val combo: ComboBox) : Grou } @NlsContexts.ListItem - abstract fun getText(value: T): String + open fun getText(value: T): String = "" @Nls - abstract fun getSecondaryText(value: T): String? - abstract fun getIcon(value: T): Icon? + open fun getSecondaryText(value: T): String? = null + open fun getIcon(value: T): Icon? = null - open fun customize(item: SimpleColoredComponent, value: T) { + open fun customize(item: SimpleColoredComponent, value: T, index: Int) { val text = getText(value) item.append(text) @@ -86,7 +86,7 @@ abstract class GroupedComboBoxRenderer(private val combo: ComboBox) : Grou cellHasFocus: Boolean): Component { coloredComponent.apply { clear() - customize(this, value) + customize(this, value, index) } mySeparatorComponent.apply {