private RmlTextHighlighter() { language = new LanguageData(new XmlGrammar()); parser = new Parser(language); ConfigSection rmlHighlightSection = EditorConfig.getConfigSection("RmlColors"); Color.TryFromRGBAString(rmlHighlightSection.getValue("BackgroundColor", "#191919"), out backgroundColor, backgroundColor); commentColor = EditorConfig.readConfigHexColor(rmlHighlightSection, "CommentColor", commentColor); attributeColor = EditorConfig.readConfigHexColor(rmlHighlightSection, "AttributeColor", attributeColor); elementColor = EditorConfig.readConfigHexColor(rmlHighlightSection, "ElementColor", elementColor); stringColor = EditorConfig.readConfigHexColor(rmlHighlightSection, "StringColor", stringColor); textColor = EditorConfig.readConfigHexColor(rmlHighlightSection, "TextColor", textColor); punctuationColor = EditorConfig.readConfigHexColor(rmlHighlightSection, "PunctuationColor", punctuationColor); }
private CssTextHighlighter() { language = new LanguageData(new CssGrammar()); parser = new Parser(language); ConfigSection cssHighlightSection = EditorConfig.getConfigSection("CssColors"); Color.TryFromRGBAString(cssHighlightSection.getValue("BackgroundColor", "#191919"), out backgroundColor, backgroundColor); commentColor = EditorConfig.readConfigHexColor(cssHighlightSection, "CommentColor", commentColor); propertyColor = EditorConfig.readConfigHexColor(cssHighlightSection, "PropertyColor", propertyColor); valueColor = EditorConfig.readConfigHexColor(cssHighlightSection, "ValueColor", valueColor); selectorColor = EditorConfig.readConfigHexColor(cssHighlightSection, "SelectorColor", selectorColor); punctuationColor = EditorConfig.readConfigHexColor(cssHighlightSection, "PunctuationColor", punctuationColor); otherTextColor = EditorConfig.readConfigHexColor(cssHighlightSection, "OtherTextColor", otherTextColor); }