void () { EditorColorsScheme defaultScheme = EditorColorsManager.getInstance().getScheme(EditorColorsScheme.DEFAULT_SCHEME_NAME); EditorColorsScheme parentScheme = (EditorColorsScheme)defaultScheme.clone(); parentScheme.setName("DefaultTest"); AbstractColorsScheme editorColorsScheme = new EditorColorsSchemeImpl(parentScheme); editorColorsScheme.setName("test"); TextAttributes defaultAttributes = new TextAttributes(null, null, Color.BLACK, EffectType.LINE_UNDERSCORE, Font.PLAIN); TextAttributesKey testKey = TextAttributesKey.createTextAttributesKey("TEST_KEY", DefaultLanguageHighlighterColors.PARAMETER); parentScheme.setAttributes(testKey, defaultAttributes); editorColorsScheme.setAttributes(testKey, AbstractColorsScheme.INHERITED_ATTRS_MARKER); try { Element root = new Element("scheme"); editorColorsScheme.writeExternal(root); AbstractColorsScheme targetScheme = new EditorColorsSchemeImpl(parentScheme); for (final Element child : root.getChildren()) { if ("attributes".equals(child.getName())) { targetScheme.readAttributes(child); } } TextAttributes targetAttributes = targetScheme.getDirectlyDefinedAttributes(testKey); assertSame(AbstractColorsScheme.INHERITED_ATTRS_MARKER, targetAttributes); } finally { TextAttributesKey.removeTextAttributesKey(testKey.getExternalName()); } }