boolean (@NotNull EditorColorsScheme editorScheme, @NotNull String name) { if (editorScheme instanceof MyColorScheme scheme) { EditorColorsScheme clone = (EditorColorsScheme)scheme.getParentScheme().clone(); scheme.apply(clone); if (clone instanceof AbstractColorsScheme) { ((AbstractColorsScheme)clone).setSaveNeeded(true); } clone.setName(name); MyColorScheme newScheme = new MyColorScheme(clone); initScheme(newScheme); newScheme.setIsNew(); mySchemes.put(name, newScheme); selectScheme(newScheme.getName()); resetSchemesCombo(null); return true; } return false; }