void (@NotNull EditorSchemeAttributeDescriptor attributeDescriptor) { if (!(attributeDescriptor instanceof RainbowAttributeDescriptor descriptor)) return; EditorColorsScheme editedColorsScheme = descriptor.getScheme(); Boolean rainbowOn = RainbowHighlighter.isRainbowEnabled(editedColorsScheme, descriptor.getLanguage()); boolean isInherited = false; // the colors are editable only for default language boolean isDefaultLanguage = descriptor.getLanguage() == null; boolean isEnable = !ColorAndFontOptions.isReadOnly(editedColorsScheme); if (rainbowOn == null) { isInherited = true; rainbowOn = RainbowHighlighter.isRainbowEnabled(editedColorsScheme, null); } myRainbow.setEnabled(isEnable && !isInherited); myRainbow.setSelected(rainbowOn); for (int i = 0; i < myLStops.length; ++i) { myLStops[i].setEnabled(isEnable && isDefaultLanguage); myStops[i].setEnabled(rainbowOn); myStops[i].setEditable(isEnable && isDefaultLanguage); myStops[i].setSelectedColor(editedColorsScheme.getAttributes(RainbowHighlighter.RAINBOW_COLOR_KEYS[i]).getForegroundColor()); } myInheritanceLabel.setVisible(!isDefaultLanguage); myInheritAttributesBox.setEnabled(isEnable); myInheritAttributesBox.setSelected(isInherited); myInheritAttributesBox.setVisible(!isDefaultLanguage); }