I'm creating a lookup element with LookupElementBuilder. I'd like to change its text color to red. I do that by calling:
This worked fine until IJ 2019. I think it stopped working due to a change in LookupCellRenderer.getListCellRendererComponent(..) line 161:
Color itemColor = isSelected ? SELECTED_FOREGROUND_COLOR : JBColor.namedColor("CompletionPopup.foreground", presentation.getItemTextForeground());
Looks like the color I set in the presentation is only used as a default.
Am I doing somethnig wrong or is there another way I should use to set the lookup element text color (preferably something that will also work in previous versions)?