void (@NotNull Element node) { deprecatedBackgroundColor = null; if (!SCHEME_ELEMENT.equals(node.getName())) { return; } setName(node.getAttributeValue(NAME_ATTR)); int readVersion = Integer.parseInt(node.getAttributeValue(VERSION_ATTR, "0")); if (readVersion > CURR_VERSION) { throw new IllegalStateException("Unsupported color scheme version: " + readVersion); } version = readVersion; String isDefaultScheme = node.getAttributeValue(DEFAULT_SCHEME_ATTR); boolean isDefault = isDefaultScheme != null && Boolean.parseBoolean(isDefaultScheme); if (!isDefault) { parentScheme = getDefaultScheme(node.getAttributeValue(PARENT_SCHEME_ATTR, EmptyColorScheme.NAME)); } metaInfo.clear(); Ref<Float> fontScale = new Ref<>(); boolean clearEditorFonts = true; boolean clearConsoleFonts = true; for (Element childNode : node.getChildren()) { String childName = childNode.getName(); switch (childName) { case OPTION_ELEMENT -> readSettings(childNode, isDefault, fontScale); case EDITOR_FONT -> { readFontSettings(ensureEditableFontPreferences(), childNode, isDefault, fontScale.get(), clearEditorFonts); clearEditorFonts = false; } case CONSOLE_FONT -> { readFontSettings(ensureEditableConsoleFontPreferences(), childNode, isDefault, fontScale.get(), clearConsoleFonts); clearConsoleFonts = false; } case COLORS_ELEMENT -> readColors(childNode); case ATTRIBUTES_ELEMENT -> readAttributes(childNode); case META_INFO_ELEMENT -> readMetaInfo(childNode); } } if (deprecatedBackgroundColor != null) { TextAttributes textAttributes = attributesMap.get(HighlighterColors.TEXT.getExternalName()); if (textAttributes == null) { textAttributes = new TextAttributes(Color.black, deprecatedBackgroundColor, null, EffectType.BOXED, Font.PLAIN); attributesMap.put(HighlighterColors.TEXT.getExternalName(), textAttributes); } else { textAttributes.setBackgroundColor(deprecatedBackgroundColor); } } if (consoleFontPreferences.getEffectiveFontFamilies().isEmpty()) { fontPreferences.copyTo(consoleFontPreferences); } initFonts(); }