public Theme GetTheme()
{
// I don't want to reference many of COM libraries to get current VS theme
// so I'm trying to get recognize it from current format settings
var formatMap = classificationFormatMapService.GetClassificationFormatMap("output");
var theme = GetThemeFromTextProperties(formatMap.DefaultTextProperties);
if (theme != null) {
return theme.Value;
}
// This code can be userd for
// var literalClassificationType = formatMap.CurrentPriorityOrder.FirstOrDefault(c => c != null && c.Classification.Equals("literal", StringComparison.OrdinalIgnoreCase));
// if (literalClassificationType != null) {
// theme = GetThemeFromTextProperties(formatMap.GetTextProperties(literalClassificationType));
// if (theme != null) {
// return theme.Value;
// }
// }
return Theme.Light;
}