void (@NotNull EditorSchemeAttributeDescriptor attrDescription, EditorColorsScheme scheme) { if (!(attrDescription instanceof ColorAndFontDescription description)) return; description.setInherited(myInheritAttributesBox.isSelected()); if (description.isInherited()) { TextAttributes baseAttributes = description.getBaseAttributes(); if (baseAttributes != null) { description.setFontType(baseAttributes.getFontType()); description.setForegroundChecked(baseAttributes.getForegroundColor() != null); description.setForegroundColor(baseAttributes.getForegroundColor()); description.setBackgroundChecked(baseAttributes.getBackgroundColor() != null); description.setBackgroundColor(baseAttributes.getBackgroundColor()); description.setErrorStripeChecked(baseAttributes.getErrorStripeColor() != null); description.setErrorStripeColor(baseAttributes.getErrorStripeColor()); description.setEffectColor(baseAttributes.getEffectColor()); description.setEffectType(baseAttributes.getEffectType()); description.setEffectsColorChecked(baseAttributes.getEffectColor() != null); } else { description.setInherited(false); } reset(description); } else { setInheritanceInfo(description); int fontType = Font.PLAIN; if (myCbBold.isSelected()) fontType |= Font.BOLD; if (myCbItalic.isSelected()) fontType |= Font.ITALIC; description.setFontType(fontType); description.setForegroundChecked(myCbForeground.isSelected()); description.setForegroundColor(myForegroundChooser.getSelectedColor()); description.setBackgroundChecked(myCbBackground.isSelected()); description.setBackgroundColor(myBackgroundChooser.getSelectedColor()); description.setErrorStripeChecked(myCbErrorStripe.isSelected()); description.setErrorStripeColor(myErrorStripeColorChooser.getSelectedColor()); description.setEffectsColorChecked(myCbEffects.isSelected()); description.setEffectColor(myEffectsColorChooser.getSelectedColor()); if (myEffectsCombo.isEnabled()) { String effectType = (String)myEffectsCombo.getModel().getSelectedItem(); description.setEffectType(myEffectsMap.get(effectType)); } } description.apply(scheme); }