private HighlighterAttributes GetVsHighlighterAttributesNoCache([NotNull] string highlighterAttributeId) { ColorableItems colorableItems = VsColorUtilities.TryGetColorableItemsByName(highlighterAttributeId, _dte); if (colorableItems == null) return HighlighterAttributes.UNDEFINED; Color foregroundColor = ColorTranslator.FromOle((int) colorableItems.Foreground); var attributes = new HighlighterAttributes(foregroundColor); if (colorableItems.Bold) attributes = attributes.Merge(new HighlighterAttributes(FontStyle.Bold)); return attributes; }
private HighlighterAttributes GetVsHighlighterAttributesNoCache([NotNull] string highlighterAttributeId) { ColorableItems colorableItems = VsColorUtilities.TryGetColorableItemsByName(highlighterAttributeId, _dte); if (colorableItems == null) { return(HighlighterAttributes.UNDEFINED); } Color foregroundColor = ColorTranslator.FromOle((int)colorableItems.Foreground); var attributes = new HighlighterAttributes(foregroundColor); if (colorableItems.Bold) { attributes = attributes.Merge(new HighlighterAttributes(FontStyle.Bold)); } return(attributes); }