diff --git a/src/EditorFeatures/Core.Wpf/Classification/ClassificationTypeFormatDefinitions.cs b/src/EditorFeatures/Core.Wpf/Classification/ClassificationTypeFormatDefinitions.cs index e92acf3df382edb09f5681759932111d19567943..e3b2d74ab7ae7864666587063937eaa664c895c5 100644 --- a/src/EditorFeatures/Core.Wpf/Classification/ClassificationTypeFormatDefinitions.cs +++ b/src/EditorFeatures/Core.Wpf/Classification/ClassificationTypeFormatDefinitions.cs @@ -259,7 +259,7 @@ private class UserTypeModulesFormatDefinition : ClassificationFormatDefinition public UserTypeModulesFormatDefinition() { this.DisplayName = EditorFeaturesResources.User_Types_Modules; - this.ForegroundColor = Color.FromRgb(43, 145, 175); + this.ForegroundColor = Color.FromRgb(0x2B, 0x91, 0xAF); } } #endregion @@ -683,14 +683,14 @@ public XmlDocCommentTextFormatDefinition() private static readonly Color s_regexGroupingAndAlternationColor = Color.FromRgb(0x05, 0xc3, 0xba); private static readonly Color s_characterClassColor = Color.FromRgb(0x00, 0x8a, 0xff); private static readonly Color s_regexAnchorAndQuantifierColor = Color.FromRgb(0xd7, 0x45, 0x8c); - private static readonly Color s_regexCommentColor = Color.FromRgb(87, 166, 74); + private static readonly Color s_regexCommentColor = Color.FromRgb(0x61, 0xa6, 0x4a); #else private static readonly Color s_regexTextColor = Color.FromRgb(0x80, 0x00, 0x00); private static readonly Color s_regexOtherEscapeColor = Color.FromRgb(0x9e, 0x5b, 0x71); private static readonly Color s_regexGroupingAndAlternationColor = Color.FromRgb(0x05, 0xc3, 0xba); private static readonly Color s_characterClassColor = Color.FromRgb(0x00, 0x73, 0xff); private static readonly Color s_regexAnchorAndQuantifierColor = Color.FromRgb(0xff, 0x00, 0xc1); - private static readonly Color s_regexCommentColor = Color.FromRgb(0, 128, 0); + private static readonly Color s_regexCommentColor = Color.FromRgb(0x00, 0x80, 0x00); #endif [Export(typeof(EditorFormatDefinition))] @@ -863,7 +863,7 @@ private class XmlLiteralAttributeNameFormatDefinition : ClassificationFormatDefi public XmlLiteralAttributeNameFormatDefinition() { this.DisplayName = EditorFeaturesResources.VB_XML_Literals_Attribute_Name; - this.ForegroundColor = Color.FromRgb(185, 100, 100); // HC_LIGHTRED + this.ForegroundColor = Color.FromRgb(0xB9, 0x64, 0x64); // HC_LIGHTRED } } #endregion @@ -879,7 +879,7 @@ private class XmlLiteralAttributeQuotesFormatDefinition : ClassificationFormatDe public XmlLiteralAttributeQuotesFormatDefinition() { this.DisplayName = EditorFeaturesResources.VB_XML_Literals_Attribute_Quotes; - this.ForegroundColor = Color.FromRgb(85, 85, 85); // HC_LIGHTBLACK + this.ForegroundColor = Color.FromRgb(0x55, 0x55, 0x55); // HC_LIGHTBLACK } } #endregion @@ -895,7 +895,7 @@ private class XmlLiteralAttributeValueFormatDefinition : ClassificationFormatDef public XmlLiteralAttributeValueFormatDefinition() { this.DisplayName = EditorFeaturesResources.VB_XML_Literals_Attribute_Value; - this.ForegroundColor = Color.FromRgb(100, 100, 185); // HC_LIGHTBLUE + this.ForegroundColor = Color.FromRgb(0x64, 0x64, 0xB9); // HC_LIGHTBLUE } } #endregion @@ -911,7 +911,7 @@ private class XmlLiteralCDataSectionFormatDefinition : ClassificationFormatDefin public XmlLiteralCDataSectionFormatDefinition() { this.DisplayName = EditorFeaturesResources.VB_XML_Literals_CData_Section; - this.ForegroundColor = Color.FromRgb(192, 192, 192); // HC_LIGHTGRAY + this.ForegroundColor = Color.FromRgb(0xC0, 0xC0, 0xC0); // HC_LIGHTGRAY } } #endregion @@ -927,7 +927,7 @@ private class XmlLiteralCommentFormatDefinition : ClassificationFormatDefinition public XmlLiteralCommentFormatDefinition() { this.DisplayName = EditorFeaturesResources.VB_XML_Literals_Comment; - this.ForegroundColor = Color.FromRgb(98, 151, 85); // HC_LIGHTGREEN + this.ForegroundColor = Color.FromRgb(0x62, 0x97, 0x55); // HC_LIGHTGREEN } } #endregion @@ -943,7 +943,7 @@ private class XmlLiteralDelimiterFormatDefinition : ClassificationFormatDefiniti public XmlLiteralDelimiterFormatDefinition() { this.DisplayName = EditorFeaturesResources.VB_XML_Literals_Delimiter; - this.ForegroundColor = Color.FromRgb(100, 100, 185); // HC_LIGHTBLUE + this.ForegroundColor = Color.FromRgb(0x64, 0x64, 0xB9); // HC_LIGHTBLUE } } #endregion @@ -959,8 +959,8 @@ private class XmlLiteralEmbeddedExpressionFormatDefinition : ClassificationForma public XmlLiteralEmbeddedExpressionFormatDefinition() { this.DisplayName = EditorFeaturesResources.VB_XML_Literals_Embedded_Expression; - this.ForegroundColor = Color.FromRgb(85, 85, 85); // HC_LIGHTBLACK - this.BackgroundColor = Color.FromRgb(255, 254, 191); // HC_LIGHTYELLOW + this.ForegroundColor = Color.FromRgb(0x55, 0x55, 0x55); // HC_LIGHTBLACK + this.BackgroundColor = Color.FromRgb(0xFF, 0xFE, 0xBF); // HC_LIGHTYELLOW } } #endregion @@ -976,7 +976,7 @@ private class XmlLiteralEntityReferenceFormatDefinition : ClassificationFormatDe public XmlLiteralEntityReferenceFormatDefinition() { this.DisplayName = EditorFeaturesResources.VB_XML_Literals_Entity_Reference; - this.ForegroundColor = Color.FromRgb(185, 100, 100); // HC_LIGHTRED + this.ForegroundColor = Color.FromRgb(0xB9, 0x64, 0x64); // HC_LIGHTRED } } #endregion @@ -992,7 +992,7 @@ private class XmlLiteralNameFormatDefinition : ClassificationFormatDefinition public XmlLiteralNameFormatDefinition() { this.DisplayName = EditorFeaturesResources.VB_XML_Literals_Name; - this.ForegroundColor = Color.FromRgb(132, 70, 70); // HC_LIGHTMAROON + this.ForegroundColor = Color.FromRgb(0x84, 0x46, 0x46); // HC_LIGHTMAROON } } #endregion @@ -1008,7 +1008,7 @@ private class XmlLiteralProcessingInstructionFormatDefinition : ClassificationFo public XmlLiteralProcessingInstructionFormatDefinition() { this.DisplayName = EditorFeaturesResources.VB_XML_Literals_Processing_Instruction; - this.ForegroundColor = Color.FromRgb(192, 192, 192); // HC_LIGHTGRAY + this.ForegroundColor = Color.FromRgb(0xC0, 0xC0, 0xC0); // HC_LIGHTGRAY } } #endregion @@ -1024,7 +1024,7 @@ private class XmlLiteralTextFormatDefinition : ClassificationFormatDefinition public XmlLiteralTextFormatDefinition() { this.DisplayName = EditorFeaturesResources.VB_XML_Literals_Text; - this.ForegroundColor = Color.FromRgb(85, 85, 85); // HC_LIGHTBLACK + this.ForegroundColor = Color.FromRgb(0x55, 0x55, 0x55); // HC_LIGHTBLACK } } #endregion diff --git a/src/EditorFeatures/Core.Wpf/Utilities/NativeMethods.cs b/src/EditorFeatures/Core.Wpf/Utilities/NativeMethods.cs new file mode 100644 index 0000000000000000000000000000000000000000..721f6a2aa9c512f649efff7afbd2174934429658 --- /dev/null +++ b/src/EditorFeatures/Core.Wpf/Utilities/NativeMethods.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Runtime.InteropServices; + +namespace Microsoft.CodeAnalysis.Editor.Wpf.Utilities +{ + internal static class NativeMethods + { + public static readonly IntPtr HWND_BROADCAST = new IntPtr(0xFFFF); + public const int WM_SYSCOLORCHANGE = 0x0015; + + [DllImport("user32.dll", CharSet = CharSet.Auto)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool PostMessage(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam); + } +} diff --git a/src/EditorFeatures/Core/ColorSchemes/SchemeName.cs b/src/EditorFeatures/Core/ColorSchemes/SchemeName.cs new file mode 100644 index 0000000000000000000000000000000000000000..837080f8fc09f0df5d53d09c1f968507cbc11754 --- /dev/null +++ b/src/EditorFeatures/Core/ColorSchemes/SchemeName.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.CodeAnalysis.Editor.ColorSchemes +{ + internal enum SchemeName + { + None, + VisualStudio2017, + Enhanced + } +} diff --git a/src/EditorFeatures/Core/Options/ColorSchemeOptions.cs b/src/EditorFeatures/Core/Options/ColorSchemeOptions.cs new file mode 100644 index 0000000000000000000000000000000000000000..bf9724247f2ab9ed9d7a05646d6a52fcc242d2cd --- /dev/null +++ b/src/EditorFeatures/Core/Options/ColorSchemeOptions.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Immutable; +using System.Composition; +using Microsoft.CodeAnalysis.Editor.ColorSchemes; +using Microsoft.CodeAnalysis.Options; +using Microsoft.CodeAnalysis.Options.Providers; + +namespace Microsoft.CodeAnalysis.Editor.Options +{ + internal static class ColorSchemeOptions + { + internal const string ColorSchemeSettingKey = "TextEditor.Roslyn.ColorScheme"; + + public static readonly Option ColorScheme = new Option(nameof(ColorSchemeOptions), + nameof(ColorScheme), + defaultValue: SchemeName.Enhanced, + storageLocations: new RoamingProfileStorageLocation(ColorSchemeSettingKey)); + + // The applied color scheme is a local setting because it is the scheme that is applied to + // the users current registry hive. + public static readonly Option AppliedColorScheme = new Option(nameof(ColorSchemeOptions), + nameof(AppliedColorScheme), + defaultValue: SchemeName.None, + storageLocations: new LocalUserProfileStorageLocation(@"Roslyn\ColorSchemeApplier\AppliedColorScheme")); + + public static readonly Option LegacyUseEnhancedColors = new Option(nameof(ColorSchemeOptions), + nameof(LegacyUseEnhancedColors), + defaultValue: UseEnhancedColors.Default, + storageLocations: new RoamingProfileStorageLocation("WindowManagement.Options.UseEnhancedColorsForManagedLanguages")); + + public enum UseEnhancedColors + { + Migrated = -2, + DoNotUse = -1, + Default = 0, + Use = 1 + } + } + + [ExportOptionProvider, Shared] + internal class ColorSchemeOptionsProvider : IOptionProvider + { + [ImportingConstructor] + public ColorSchemeOptionsProvider() + { + } + + public ImmutableArray Options => ImmutableArray.Create( + ColorSchemeOptions.ColorScheme, + ColorSchemeOptions.AppliedColorScheme, + ColorSchemeOptions.LegacyUseEnhancedColors); + } +} diff --git a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPage.cs b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPage.cs index 008b57296030f54ef415f50e2ef2589ceeeb903d..84e0410e47e1cf724e70e7499daad462b47ead3a 100644 --- a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPage.cs +++ b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPage.cs @@ -4,6 +4,7 @@ using System; using System.Runtime.InteropServices; +using Microsoft.VisualStudio.ComponentModelHost; using Microsoft.VisualStudio.LanguageServices.Implementation.Options; namespace Microsoft.VisualStudio.LanguageServices.CSharp.Options @@ -13,7 +14,8 @@ internal class AdvancedOptionPage : AbstractOptionPage { protected override AbstractOptionPageControl CreateOptionPage(IServiceProvider serviceProvider, OptionStore optionStore) { - return new AdvancedOptionPageControl(optionStore); + var componentModel = (IComponentModel)this.Site.GetService(typeof(SComponentModel)); + return new AdvancedOptionPageControl(optionStore, componentModel); } } } diff --git a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml index 56fce6f9064c9d25a451e2b44441474c7dac9cbf..f29b28aeebeca3447a3352a04943154ec1813f36 100644 --- a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml +++ b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml @@ -125,10 +125,20 @@ + Header="{x:Static local:AdvancedOptionPageStrings.Option_Editor_Color_Scheme}"> - + + + + + + diff --git a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml.cs b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml.cs index 12433a8360575bf1804941b7d1b26aa8921a01fb..591a979346976363775b16c27605413a6f8d1299 100644 --- a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml.cs +++ b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageControl.xaml.cs @@ -2,9 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Windows; +using System.Windows.Media; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Editing; using Microsoft.CodeAnalysis.Editor.CSharp.SplitStringLiteral; +using Microsoft.CodeAnalysis.Editor.Options; using Microsoft.CodeAnalysis.Editor.Shared.Options; using Microsoft.CodeAnalysis.EmbeddedLanguages.RegularExpressions; using Microsoft.CodeAnalysis.ExtractMethod; @@ -15,14 +18,20 @@ using Microsoft.CodeAnalysis.Structure; using Microsoft.CodeAnalysis.SymbolSearch; using Microsoft.CodeAnalysis.ValidateFormatString; +using Microsoft.VisualStudio.ComponentModelHost; +using Microsoft.VisualStudio.LanguageServices.ColorSchemes; using Microsoft.VisualStudio.LanguageServices.Implementation.Options; namespace Microsoft.VisualStudio.LanguageServices.CSharp.Options { internal partial class AdvancedOptionPageControl : AbstractOptionPageControl { - public AdvancedOptionPageControl(OptionStore optionStore) : base(optionStore) + private ColorSchemeApplier _colorSchemeApplier; + + public AdvancedOptionPageControl(OptionStore optionStore, IComponentModel componentModel) : base(optionStore) { + _colorSchemeApplier = componentModel.GetService(); + InitializeComponent(); BindToOption(Background_analysis_scope_active_file, SolutionCrawlerOptions.BackgroundAnalysisScopeOption, BackgroundAnalysisScope.ActiveFile, LanguageNames.CSharp); @@ -72,7 +81,21 @@ public AdvancedOptionPageControl(OptionStore optionStore) : base(optionStore) BindToOption(Highlight_related_components_under_cursor, RegularExpressionsOptions.HighlightRelatedRegexComponentsUnderCursor, LanguageNames.CSharp); BindToOption(Show_completion_list, RegularExpressionsOptions.ProvideRegexCompletions, LanguageNames.CSharp); - BindToOption(Use_enhanced_colors, FeatureOnOffOptions.UseEnhancedColors); + BindToOption(Editor_color_scheme, ColorSchemeOptions.ColorScheme); + } + + // Since this dialog is constructed once for the lifetime of the application and VS Theme can be changed after the application has started, + // we need to update the visibility of our combobox and warnings based on the current VS theme before being rendered. + internal override void OnLoad() + { + var isSupportedTheme = _colorSchemeApplier.IsSupportedTheme(); + var isThemeCustomized = _colorSchemeApplier.IsThemeCustomized(); + + Editor_color_scheme.Visibility = isSupportedTheme ? Visibility.Visible : Visibility.Collapsed; + Customized_Theme_Warning.Visibility = isSupportedTheme && isThemeCustomized ? Visibility.Visible : Visibility.Collapsed; + Custom_VS_Theme_Warning.Visibility = isSupportedTheme ? Visibility.Collapsed : Visibility.Visible; + + base.OnLoad(); } } } diff --git a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageStrings.cs b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageStrings.cs index 1a2def4d988ce0313cded48313b60c738094141e..1f149b2df5ca3151e8e3746a7448fa785239502d 100644 --- a/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageStrings.cs +++ b/src/VisualStudio/CSharp/Impl/Options/AdvancedOptionPageStrings.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using Microsoft.CodeAnalysis.Editor.ColorSchemes; + namespace Microsoft.VisualStudio.LanguageServices.CSharp.Options { internal static class AdvancedOptionPageStrings @@ -195,10 +197,25 @@ public static string Option_SeparateImportGroups public static string Option_Show_completion_list => ServicesVSResources.Show_completion_list; - public static string Option_Classifications => - ServicesVSResources.Classifications; + public static string Option_Editor_Color_Scheme => + ServicesVSResources.Editor_Color_Scheme; + + public static string Editor_color_scheme_options_are_only_available_when_using_a_color_theme_bundled_with_Visual_Studio_The_color_theme_can_be_configured_from_the_Environment_General_options_page + => ServicesVSResources.Editor_color_scheme_options_are_only_available_when_using_a_color_theme_bundled_with_Visual_Studio_The_color_theme_can_be_configured_from_the_Environment_General_options_page; + + public static string Some_color_scheme_colors_are_being_overridden_by_changes_made_in_the_Environment_Fonts_and_Colors_options_page_Choose_Use_Defaults_in_the_Fonts_and_Colors_page_to_revert_all_customizations + => ServicesVSResources.Some_color_scheme_colors_are_being_overridden_by_changes_made_in_the_Environment_Fonts_and_Colors_options_page_Choose_Use_Defaults_in_the_Fonts_and_Colors_page_to_revert_all_customizations; + + public static string Option_Color_Scheme_Enhanced => + ServicesVSResources.Enhanced; + + public static string Option_Color_Scheme_VisualStudio2017 => + ServicesVSResources.Visual_Studio_2017; + + public static SchemeName Color_Scheme_Enhanced_Tag => + SchemeName.Enhanced; - public static string Option_Use_enhanced_colors_for_C_and_Basic => - ServicesVSResources.Use_enhanced_colors_for_C_and_Basic; + public static SchemeName Color_Scheme_VisualStudio2017_Tag => + SchemeName.VisualStudio2017; } } diff --git a/src/VisualStudio/CSharp/Impl/VSPackage.resx b/src/VisualStudio/CSharp/Impl/VSPackage.resx index 98ec029d031078074c1fc0abd9644f05335b2870..38968c1ec5603ff6cb4e400f5ba40f154bd43738 100644 --- a/src/VisualStudio/CSharp/Impl/VSPackage.resx +++ b/src/VisualStudio/CSharp/Impl/VSPackage.resx @@ -187,7 +187,8 @@ prefer throwing properties; prefer auto properties; regex; regular expression; -Use enhanced colors; +Use enhanced colors; +Editor Color Scheme; C# Advanced options page keywords diff --git a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.cs.xlf b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.cs.xlf index f56140419a632a1e99efa670027d4ebf08367da2..b327f03e4af3e0810d2d9c9a319939d138be7ae8 100644 --- a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.cs.xlf +++ b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.cs.xlf @@ -78,8 +78,9 @@ prefer throwing properties; prefer auto properties; regex; regular expression; -Use enhanced colors; - Zobrazit diagnostiku pro zavřené soubory; +Use enhanced colors; +Editor Color Scheme; + Zobrazit diagnostiku pro zavřené soubory; Vybarvit regulární výraz; Zvýrazňovat související komponenty pod kurzorem; Nahlásit neplatné regulární výrazy; diff --git a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.de.xlf b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.de.xlf index 63e85f480a05e7f933deb23359eaac9816341b1c..85a8dc05f5764809cf2727216ab07bf7facac359 100644 --- a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.de.xlf +++ b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.de.xlf @@ -78,8 +78,9 @@ prefer throwing properties; prefer auto properties; regex; regular expression; -Use enhanced colors; - Diagnoseinformationen für geschlossene Dateien anzeigen; +Use enhanced colors; +Editor Color Scheme; + Diagnoseinformationen für geschlossene Dateien anzeigen; Reguläre Ausdrücke farbig hervorheben; Zugehörige Komponenten unter dem Cursor markieren; Ungültige reguläre Ausdrücke melden; diff --git a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.es.xlf b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.es.xlf index 39aac13fc3b2bfe55868086bfb643af2bab98474..90d53a8d97916e7c3a162f3c20dd9e1c3e24f3b7 100644 --- a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.es.xlf +++ b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.es.xlf @@ -78,8 +78,9 @@ prefer throwing properties; prefer auto properties; regex; regular expression; -Use enhanced colors; - Mostrar diagnóstico para archivos cerrados; +Use enhanced colors; +Editor Color Scheme; + Mostrar diagnóstico para archivos cerrados; Colorear expresión regular; Resaltar componentes relacionados bajo el cursor; Informar sobre expresiones regulares no válidas; diff --git a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.fr.xlf b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.fr.xlf index 6bcedba09d3dfe04ea1681799c3d177a8f19c4fc..5b20179f149cb88642dd7ba36d19f054c46832de 100644 --- a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.fr.xlf +++ b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.fr.xlf @@ -78,8 +78,9 @@ prefer throwing properties; prefer auto properties; regex; regular expression; -Use enhanced colors; - Afficher les diagnostics pour les fichiers fermés ; +Use enhanced colors; +Editor Color Scheme; + Afficher les diagnostics pour les fichiers fermés ; Coloriser l'expression régulière ; Surligner les composants liés sous le curseur ; Signaler les expressions régulières non valides ; diff --git a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.it.xlf b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.it.xlf index 794f975dca4619173d8d90ea766c27f1622f0046..560512368a295205403529a948c845621153b9b2 100644 --- a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.it.xlf +++ b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.it.xlf @@ -78,8 +78,9 @@ prefer throwing properties; prefer auto properties; regex; regular expression; -Use enhanced colors; - Mostra diagnostica per file chiusi; +Use enhanced colors; +Editor Color Scheme; + Mostra diagnostica per file chiusi; Colora espressione regolare; Evidenzia componenti correlati sotto il cursore; Segnala espressioni regolari non valide; diff --git a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.ja.xlf b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.ja.xlf index 00e025b2cb824eea6668cd9c34329446e1509f6f..c5c6cab4dda90f1766a3704bc90eb4795d0b3470 100644 --- a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.ja.xlf +++ b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.ja.xlf @@ -78,8 +78,9 @@ prefer throwing properties; prefer auto properties; regex; regular expression; -Use enhanced colors; - 閉じているファイルの診断結果を表示する; +Use enhanced colors; +Editor Color Scheme; + 閉じているファイルの診断結果を表示する; 正規表現をカラー化する; カーソルの下にある関連コンポーネントをハイライトする; 無効な正規表現を報告する; diff --git a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.ko.xlf b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.ko.xlf index 5af47232a3cc648da0dfcb46898090ed82dc325b..42974b87d3f74b442cc1db51be5105a92afaeb29 100644 --- a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.ko.xlf +++ b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.ko.xlf @@ -78,8 +78,9 @@ prefer throwing properties; prefer auto properties; regex; regular expression; -Use enhanced colors; - 닫힌 파일에 대한 진단 표시; +Use enhanced colors; +Editor Color Scheme; + 닫힌 파일에 대한 진단 표시; 정규식 색 지정; 커서 아래의 관련 구성 요소 강조; 잘못된 정규식 보고; diff --git a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.pl.xlf b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.pl.xlf index 59137892fcf52ec727cdfc86f4e194598abb91fb..a7c81d4eebb1916548903e6971f6625e7ea919ed 100644 --- a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.pl.xlf +++ b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.pl.xlf @@ -78,8 +78,9 @@ prefer throwing properties; prefer auto properties; regex; regular expression; -Use enhanced colors; - Pokaż dane diagnostyczne dla zamkniętych plików; +Use enhanced colors; +Editor Color Scheme; + Pokaż dane diagnostyczne dla zamkniętych plików; Koloruj wyrażenia regularne; Wyróżnij powiązane składniki pod kursorem; Raportuj nieprawidłowe wyrażenia regularne; diff --git a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.pt-BR.xlf b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.pt-BR.xlf index 2096d03d2da1fb99fb013f25fb6a5955fcbe3cf1..86ac59df5abe72b29245fac5bccdc81f58ce09d2 100644 --- a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.pt-BR.xlf +++ b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.pt-BR.xlf @@ -78,8 +78,9 @@ prefer throwing properties; prefer auto properties; regex; regular expression; -Use enhanced colors; - Mostrar diagnósticos de arquivos fechados; +Use enhanced colors; +Editor Color Scheme; + Mostrar diagnósticos de arquivos fechados; Colorir a expressão regular; Realçar os componentes relacionados sob o cursor; Relatar expressões regulares inválidas; diff --git a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.ru.xlf b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.ru.xlf index 67047e17777e55fa03ba2ce0c92bec124e8a5369..823660fb50cf6ccd9195cce20fdaba0f68d927b9 100644 --- a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.ru.xlf +++ b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.ru.xlf @@ -78,8 +78,9 @@ prefer throwing properties; prefer auto properties; regex; regular expression; -Use enhanced colors; - показывать диагностику для закрытых файлов; +Use enhanced colors; +Editor Color Scheme; + показывать диагностику для закрытых файлов; выделить регулярные выражения цветом; выделить связанные компоненты под курсором; сообщать о недопустимых регулярных выражениях; diff --git a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.tr.xlf b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.tr.xlf index 7eea7f3799802c843e82a7a4fb1c4d6b1fb26ab9..132e8c3ce1b8ed5df97c9a08e06234fc26448d95 100644 --- a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.tr.xlf +++ b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.tr.xlf @@ -78,8 +78,9 @@ prefer throwing properties; prefer auto properties; regex; regular expression; -Use enhanced colors; - Kapatılan dosyalara ilişkin tanılamaları göster; +Use enhanced colors; +Editor Color Scheme; + Kapatılan dosyalara ilişkin tanılamaları göster; Normal ifadeyi renklendir; İmlecin altında ilgili bileşenleri vurgula; Geçersiz normal ifadeleri bildir; diff --git a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.zh-Hans.xlf b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.zh-Hans.xlf index 9e411a335a8e70cd0520d62025393123c107ea82..6a8319a6699b11350a4c08881997d064ad778390 100644 --- a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.zh-Hans.xlf +++ b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.zh-Hans.xlf @@ -78,8 +78,9 @@ prefer throwing properties; prefer auto properties; regex; regular expression; -Use enhanced colors; - 显示已关闭文件的诊断信息; +Use enhanced colors; +Editor Color Scheme; + 显示已关闭文件的诊断信息; 对正则表达式着色; 突出显示游标下的相关组件; 报告无效的正则表达式; diff --git a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.zh-Hant.xlf b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.zh-Hant.xlf index c21e73ad9dcc0ab96fd32274a67712bfde488cb3..1726e3298979229ab03c65f8051a80e7ec43cbac 100644 --- a/src/VisualStudio/CSharp/Impl/xlf/VSPackage.zh-Hant.xlf +++ b/src/VisualStudio/CSharp/Impl/xlf/VSPackage.zh-Hant.xlf @@ -78,8 +78,9 @@ prefer throwing properties; prefer auto properties; regex; regular expression; -Use enhanced colors; - 顯示已關閉檔案的診斷; +Use enhanced colors; +Editor Color Scheme; + 顯示已關閉檔案的診斷; 為規則運算式標示色彩; 醒目提示游標下的相關元件; 回報無效的規則運算式; diff --git a/src/VisualStudio/Core/Def/ColorSchemes/Enhanced.xml b/src/VisualStudio/Core/Def/ColorSchemes/Enhanced.xml new file mode 100644 index 0000000000000000000000000000000000000000..35241c74fe1fb5c22a4200908f5b68428378fcb6 --- /dev/null +++ b/src/VisualStudio/Core/Def/ColorSchemes/Enhanced.xml @@ -0,0 +1,800 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VisualStudio/Core/Def/ColorSchemes/VisualStudio2017.xml b/src/VisualStudio/Core/Def/ColorSchemes/VisualStudio2017.xml new file mode 100644 index 0000000000000000000000000000000000000000..ab68eacd8f38c8bd9b3730fa4c60a9615e2b274c --- /dev/null +++ b/src/VisualStudio/Core/Def/ColorSchemes/VisualStudio2017.xml @@ -0,0 +1,776 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.ColorScheme.cs b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.ColorScheme.cs new file mode 100644 index 0000000000000000000000000000000000000000..355ef2db567da83bb69003246b7373831e3711ae --- /dev/null +++ b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.ColorScheme.cs @@ -0,0 +1,85 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#nullable enable + +using System; +using System.Collections.Immutable; +using System.Diagnostics; +using Microsoft.VisualStudio.Shell.Interop; + +namespace Microsoft.VisualStudio.LanguageServices.ColorSchemes +{ + internal partial class ColorSchemeApplier + { + /// + /// A ColorScheme represents a style to be applied to VS themes in + /// order to emphasize some aspect of the source code. For instance + /// C++ has an 'Enhanced (Globals vs. Members)' scheme to emphasize + /// a distinction between where identifiers are declared. + /// + private class ColorScheme + { + public ImmutableArray Themes { get; } + + public ColorScheme(ImmutableArray themes) + { + Themes = themes; + } + } + + /// + /// A ColorTheme contains a scheme's colors for a particular VS theme. + /// + private class ColorTheme + { + public string Name { get; } + public Guid Guid { get; } + public ColorCategory Category { get; } + + public ColorTheme(string name, Guid guid, ColorCategory category) + { + Name = name; + Guid = guid; + Category = category; + } + } + + private class ColorCategory + { + public string Name { get; } + public Guid Guid { get; } + public ImmutableArray Colors { get; } + + public ColorCategory(string name, Guid guid, ImmutableArray colors) + { + Name = name; + Guid = guid; + Colors = colors; + } + } + + private class ColorItem + { + public string Name { get; } + public __VSCOLORTYPE BackgroundType { get; } + public uint? Background { get; } + public __VSCOLORTYPE ForegroundType { get; } + public uint? Foreground { get; } + + public ColorItem(string name, __VSCOLORTYPE backgroundType, uint? background, __VSCOLORTYPE foregroundType, uint? foreground) + { + Name = name; + + Debug.Assert(backgroundType == __VSCOLORTYPE.CT_INVALID || background.HasValue); + BackgroundType = backgroundType; + Background = background; + + Debug.Assert(foregroundType == __VSCOLORTYPE.CT_INVALID || foreground.HasValue); + ForegroundType = foregroundType; + Foreground = foreground; + } + } + } +} diff --git a/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.ColorSchemeReader.cs b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.ColorSchemeReader.cs new file mode 100644 index 0000000000000000000000000000000000000000..4608b7542ad09d3203aa4409b1221f4e4efa0e02 --- /dev/null +++ b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.ColorSchemeReader.cs @@ -0,0 +1,119 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#nullable enable + +using System; +using System.Collections.Immutable; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Xml; +using System.Xml.Linq; +using Microsoft.VisualStudio.Shell.Interop; +using Roslyn.Utilities; + +namespace Microsoft.VisualStudio.LanguageServices.ColorSchemes +{ + internal partial class ColorSchemeApplier + { + private static class ColorSchemeReader + { + private static readonly XmlReaderSettings s_xmlSettings = new XmlReaderSettings { DtdProcessing = DtdProcessing.Prohibit }; + private const string RawColorType = nameof(__VSCOLORTYPE.CT_RAW); + private const string SystemColorType = nameof(__VSCOLORTYPE.CT_SYSCOLOR); + + public static ColorScheme ReadColorScheme(Stream schemeStream) + { + using var xmlReader = XmlReader.Create(schemeStream, s_xmlSettings); + var schemeDocument = XDocument.Load(xmlReader); + + var themes = schemeDocument + .Descendants("Theme") + .Select(ReadColorTheme); + + return new ColorScheme(themes.ToImmutableArray()); + } + + private static ColorTheme ReadColorTheme(XElement themeElement) + { + var themeName = (string)themeElement.Attribute("Name"); + var themeGuid = Guid.Parse((string)themeElement.Attribute("GUID")); + + var categoryElement = themeElement.Descendants("Category").Single(); + var category = ReadColorCategory(categoryElement); + + return new ColorTheme(themeName, themeGuid, category); + } + + private static ColorCategory ReadColorCategory(XElement categoryElement) + { + var categoryName = (string)categoryElement.Attribute("Name"); + var categoryGuid = Guid.Parse((string)categoryElement.Attribute("GUID")); + + var colorItems = categoryElement + .Descendants("Color") + .Select(ReadColorItem) + .WhereNotNull(); + + return new ColorCategory(categoryName, categoryGuid, colorItems.ToImmutableArray()); + } + + private static ColorItem? ReadColorItem(XElement colorElement) + { + var name = (string)colorElement.Attribute("Name"); + + var backgroundElement = colorElement.Descendants("Background").SingleOrDefault(); + (var backgroundType, var backgroundColor) = backgroundElement is object + ? ReadColor(backgroundElement) + : (__VSCOLORTYPE.CT_INVALID, (uint?)null); + + var foregroundElement = colorElement.Descendants("Foreground").SingleOrDefault(); + (var foregroundType, var foregroundColor) = foregroundElement is object + ? ReadColor(foregroundElement) + : (__VSCOLORTYPE.CT_INVALID, (uint?)null); + + if (backgroundElement is null && foregroundElement is null) + { + return null; + } + + return new ColorItem(name, backgroundType, backgroundColor, foregroundType, foregroundColor); + } + + private static (__VSCOLORTYPE Type, uint Color) ReadColor(XElement colorElement) + { + var colorType = (string)colorElement.Attribute("Type"); + var sourceColor = (string)colorElement.Attribute("Source"); + + __VSCOLORTYPE type; + uint color; + + if (colorType == RawColorType) + { + type = __VSCOLORTYPE.CT_RAW; + + // The ColorableItemInfo returned by the FontAndColorStorage retuns RGB color information as 0x00BBGGRR. + // Optimize for color comparisons by converting ARGB to BGR by ignoring the alpha channel and reversing byte order. + var r = sourceColor.Substring(2, 2); + var g = sourceColor.Substring(4, 2); + var b = sourceColor.Substring(6, 2); + color = uint.Parse($"{b}{g}{r}", NumberStyles.HexNumber); + } + else if (colorType == SystemColorType) + { + type = __VSCOLORTYPE.CT_SYSCOLOR; + + color = uint.Parse(sourceColor, NumberStyles.HexNumber); + } + else + { + throw ExceptionUtilities.UnexpectedValue(colorType); + } + + return (type, color); + } + } + } +} diff --git a/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.ForegroundColorDefaulter.cs b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.ForegroundColorDefaulter.cs new file mode 100644 index 0000000000000000000000000000000000000000..d39a04d41e774389b45cbae81507597a1f96c3d6 --- /dev/null +++ b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.ForegroundColorDefaulter.cs @@ -0,0 +1,313 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using System.Windows; +using Microsoft.CodeAnalysis.Classification; +using Microsoft.CodeAnalysis.Editor.ColorSchemes; +using Microsoft.CodeAnalysis.Editor.Shared.Utilities; +using Microsoft.VisualStudio.Shell; +using Microsoft.VisualStudio.Shell.Interop; +using Microsoft.VisualStudio.TextManager.Interop; +using Roslyn.Utilities; + +namespace Microsoft.VisualStudio.LanguageServices.ColorSchemes +{ + internal partial class ColorSchemeApplier + { + // Now that we are updating the theme's default color for classifications instead of updating the applied classification color, we need to + // update the classifications whose applied color matches the theme's color. These need to be reverted to the default color so that when we + // change theme colors it will be reflected in the editor. + private sealed class ForegroundColorDefaulter : ForegroundThreadAffinitizedObject + { + private readonly IServiceProvider _serviceProvider; + private readonly ColorSchemeSettings _settings; + + // Holds an lookup optimized version of the ColorScheme data. An array of ColorSchemes where ColorTheme data is + // indexed by ThemeId. ColorTheme data being foreground color indexed by classification name. + private readonly ImmutableArray>> _colorSchemes; + + private static readonly Guid TextEditorMEFItemsColorCategory = new Guid("75a05685-00a8-4ded-bae5-e7a50bfa929a"); + + // These classification colors (0x00BBGGRR) should match the VS\EditorColors.xml file. + // They are not in the scheme files because they are core classifications. + private const uint DarkThemePlainText = 0x00DCDCDCu; + private const uint DarkThemeIdentifier = DarkThemePlainText; + private const uint DarkThemeOperator = 0x00B4B4B4u; + private const uint DarkThemeKeyword = 0x00D69C56u; + + private const uint LightThemePlainText = 0x00000000u; + private const uint LightThemeIdentifier = LightThemePlainText; + private const uint LightThemeOperator = LightThemePlainText; + private const uint LightThemeKeyword = 0x00FF0000u; + + private const string PlainTextClassificationTypeName = "plain text"; + + // Dark Theme Core Classifications + private static ImmutableDictionary DarkThemeForeground => + new Dictionary() + { + [PlainTextClassificationTypeName] = DarkThemePlainText, + [ClassificationTypeNames.Identifier] = DarkThemeIdentifier, + [ClassificationTypeNames.Keyword] = DarkThemeKeyword, + [ClassificationTypeNames.Operator] = DarkThemeOperator, + }.ToImmutableDictionary(); + + // Light, Blue, or AdditionalContrast Theme Core Classifications + private static ImmutableDictionary BlueLightThemeForeground => + new Dictionary() + { + [PlainTextClassificationTypeName] = LightThemePlainText, + [ClassificationTypeNames.Identifier] = LightThemeIdentifier, + [ClassificationTypeNames.Keyword] = LightThemeKeyword, + [ClassificationTypeNames.Operator] = LightThemeOperator, + }.ToImmutableDictionary(); + + + // The High Contrast theme is not included because we do not want to make changes when the user is in High Contrast mode. + + private IVsFontAndColorStorage? _fontAndColorStorage; + private IVsFontAndColorStorage3? _fontAndColorStorage3; + private IVsFontAndColorUtilities? _fontAndColorUtilities; + + private ImmutableArray Classifications { get; } + + public ForegroundColorDefaulter(IThreadingContext threadingContext, IServiceProvider serviceProvider, ColorSchemeSettings settings, ImmutableDictionary colorSchemes) + : base(threadingContext) + { + _serviceProvider = serviceProvider; + _settings = settings; + + // Convert colors schemes into an array of theme dictionaries which contain classification dictionaries of colors. + _colorSchemes = colorSchemes.Values.Select( + scheme => scheme.Themes.ToImmutableDictionary( + theme => theme.Guid, + theme => theme.Category.Colors + .Where(color => color.Foreground.HasValue) + .ToImmutableDictionary( + color => color.Name, + color => color.Foreground!.Value))) + .ToImmutableArray(); + + // Gather all the classifications from the core and scheme dictionaries. + var coreClassifications = DarkThemeForeground.Keys.Concat(BlueLightThemeForeground.Keys).Distinct(); + var colorSchemeClassifications = _colorSchemes.SelectMany(scheme => scheme.Values.SelectMany(theme => theme.Keys)).Distinct(); + Classifications = coreClassifications.Concat(colorSchemeClassifications).ToImmutableArray(); + } + + private void EnsureInitialized() + { + if (_fontAndColorStorage is object) + { + return; + } + + _fontAndColorStorage = _serviceProvider.GetService(); + // IVsFontAndColorStorage3 has methods to default classifications but does not include the methods defined in IVsFontAndColorStorage + _fontAndColorStorage3 = (IVsFontAndColorStorage3)_fontAndColorStorage!; + _fontAndColorUtilities = (IVsFontAndColorUtilities)_fontAndColorStorage!; + } + + /// + /// Determines if all Classification foreground colors are DefaultColor or can be safely reverted to DefaultColor. + /// + public bool AreClassificationsDefaultable(Guid themeId) + { + AssertIsForeground(); + + EnsureInitialized(); + + // Make no changes when in high contast mode or in unknown theme. + if (SystemParameters.HighContrast || !IsSupportedTheme(themeId)) + { + return false; + } + + // Open Text Editor category for readonly access and do not load items if they are defaulted. + if (_fontAndColorStorage!.OpenCategory(TextEditorMEFItemsColorCategory, (uint)__FCSTORAGEFLAGS.FCSF_READONLY) != VSConstants.S_OK) + { + // We were unable to access color information. + return false; + } + + try + { + foreach (var scheme in _colorSchemes) + { + var schemeThemeColors = scheme[themeId]; + + if (AreClassificationsDefaultableToScheme(themeId, schemeThemeColors)) + { + return true; + } + } + } + finally + { + _fontAndColorStorage.CloseCategory(); + } + + return false; + } + + private bool IsSupportedTheme(Guid themeId) + { + return _colorSchemes.Any(scheme => scheme.ContainsKey(themeId)); + } + + private bool AreClassificationsDefaultableToScheme(Guid themeId, ImmutableDictionary schemeThemeColors) + { + AssertIsForeground(); + + foreach (var classification in Classifications) + { + var colorItems = new ColorableItemInfo[1]; + + if (_fontAndColorStorage!.GetItem(classification, colorItems) != VSConstants.S_OK) + { + // Classifications that are still defaulted will not have entries. + continue; + } + + var colorItem = colorItems[0]; + + if (!IsClassificationDefaultable(themeId, schemeThemeColors, colorItem, classification)) + { + return false; + } + } + + return true; + } + + /// + /// Determines if the ColorableItemInfo's Foreground is already defaulted or if the Info can be reverted to its default state. + /// This requires checking both background color and font configuration, since reverting will reset all information for the item. + /// + private bool IsClassificationDefaultable(Guid themeId, ImmutableDictionary schemeThemeColors, ColorableItemInfo colorItem, string classification) + { + AssertIsForeground(); + + if (_fontAndColorUtilities!.GetColorType(colorItem.crForeground, out var foregroundColorType) != VSConstants.S_OK) + { + // Without being able to check color type, we cannot make a determination. + return false; + } + + if (_fontAndColorUtilities!.GetColorType(colorItem.crBackground, out var backgroundColorType) != VSConstants.S_OK) + { + // Without being able to check color type, we cannot make a determination. + return false; + } + + return foregroundColorType switch + { + // The item's foreground is already defaulted and there is no work to be done. + (int)__VSCOLORTYPE.CT_AUTOMATIC => true, + // The item's foreground is set. Does it match the scheme's color and is the rest of the item defaulted? + (int)__VSCOLORTYPE.CT_RAW => IsForegroundTheSchemeColor(themeId, schemeThemeColors, classification, colorItem.crForeground) + && backgroundColorType == (int)__VSCOLORTYPE.CT_AUTOMATIC + && colorItem.dwFontFlags == (uint)FONTFLAGS.FF_DEFAULT, + _ => false + }; + } + + private bool IsForegroundTheSchemeColor(Guid themeId, ImmutableDictionary schemeThemeColors, string classification, uint foregroundColorRef) + { + var coreThemeColors = (themeId == KnownColorThemes.Dark) + ? DarkThemeForeground + : BlueLightThemeForeground; + + if (coreThemeColors.TryGetValue(classification, out var coreColor)) + { + return foregroundColorRef == coreColor; + } + + if (schemeThemeColors.TryGetValue(classification, out var schemeColor)) + { + return foregroundColorRef == schemeColor; + } + + // Since Classification inheritance isn't represented in the scheme files, + // this switch case will handle the 3 cases we expect. + var fallbackColor = classification switch + { + ClassificationTypeNames.OperatorOverloaded => coreThemeColors[ClassificationTypeNames.Operator], + ClassificationTypeNames.ControlKeyword => coreThemeColors[ClassificationTypeNames.Keyword], + _ => coreThemeColors[ClassificationTypeNames.Identifier] + }; + + return foregroundColorRef == fallbackColor; + } + + /// + /// Reverts Classifications to their default state. + /// + public void DefaultClassifications() + { + AssertIsForeground(); + + var themeId = _settings.GetThemeId(); + + // Make no changes when in high contast mode, in unknown theme, or if theme has been defaulted. + if (SystemParameters.HighContrast || !IsSupportedTheme(themeId) || _settings.HasThemeBeenDefaulted[themeId]) + { + return; + } + + // Open Text Editor category for read/write. + if (_fontAndColorStorage!.OpenCategory(TextEditorMEFItemsColorCategory, (uint)__FCSTORAGEFLAGS.FCSF_PROPAGATECHANGES) != VSConstants.S_OK) + { + // We were unable to access color information. + return; + } + + try + { + foreach (var classification in Classifications) + { + DefaultClassification(classification); + } + } + finally + { + _fontAndColorStorage.CloseCategory(); + } + + _settings.HasThemeBeenDefaulted[themeId] = true; + } + + private void DefaultClassification(string classification) + { + AssertIsForeground(); + + EnsureInitialized(); + + var colorItems = new ColorableItemInfo[1]; + if (_fontAndColorStorage!.GetItem(classification, colorItems) != VSConstants.S_OK) + { + // Classifications that are still defaulted will not have entries. + return; + } + + var colorItem = colorItems[0]; + + // If the foreground is the automatic color then no need to default the classification, + // since it will pull in the theme's color. + if (_fontAndColorUtilities!.GetColorType(colorItem.crForeground, out var foregroundColorType) == VSConstants.S_OK + && foregroundColorType == (int)__VSCOLORTYPE.CT_AUTOMATIC) + { + return; + } + + _fontAndColorStorage3!.RevertItemToDefault(classification); + } + } + } +} diff --git a/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.RegistryItem.cs b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.RegistryItem.cs new file mode 100644 index 0000000000000000000000000000000000000000..80f3992f63daec538548a3b7886ac1ab8d6dd5b0 --- /dev/null +++ b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.RegistryItem.cs @@ -0,0 +1,24 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#nullable enable + +namespace Microsoft.VisualStudio.LanguageServices.ColorSchemes +{ + internal partial class ColorSchemeApplier + { + private class RegistryItem + { + public string SectionName { get; } + public string ValueName => "Data"; + public byte[] ValueData { get; } + + public RegistryItem(string sectionName, byte[] valueData) + { + SectionName = sectionName; + ValueData = valueData; + } + } + } +} diff --git a/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.RegistryItemConverter.cs b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.RegistryItemConverter.cs new file mode 100644 index 0000000000000000000000000000000000000000..b277a6677f95e3bd8c8853a09d8260406cf4a97c --- /dev/null +++ b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.RegistryItemConverter.cs @@ -0,0 +1,140 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#nullable enable + +using System; +using System.Collections.Immutable; +using System.IO; +using System.Linq; +using System.Text; +using Microsoft.VisualStudio.Shell.Interop; + +namespace Microsoft.VisualStudio.LanguageServices.ColorSchemes +{ + internal partial class ColorSchemeApplier + { + private static class RegistryItemConverter + { + private const uint FullyOpaqueAlpha = 0xFF000000; + private const uint RegistryVersion = 0x0B; + + public static ImmutableArray Convert(ColorScheme scheme) + { + return scheme.Themes + .Select(ToRegistryItem) + .ToImmutableArray(); + } + + private static RegistryItem ToRegistryItem(ColorTheme theme) + { + var sectionName = $"Themes\\{theme.Guid:B}\\{theme.Category.Name}"; + var data = ToData(theme); + + return new RegistryItem(sectionName, data); + } + + private static byte[] ToData(ColorTheme theme) + { + //|-------------Header----------------|--Categories... + //|-Byte Count|--Version--|CategoryCnt|-- + //:ca,05,00,00,0b,00,00,00,01,00,00,00,-- + + // Initialize with a generous initial capacity. + var bytes = new MemoryStream(4096); + + // Reserve space to write the total length. + WriteDWord(bytes, 0); + + // Write the Version into the header. + WriteDWord(bytes, RegistryVersion); + + // Write the category count into the header. + WriteDWord(bytes, 1); + + WriteCategory(bytes, theme.Category); + + // Write the data length into the space that we reserved. + bytes.Seek(0, SeekOrigin.Begin); + WriteDWord(bytes, (uint)bytes.Length); + + return bytes.ToArray(); + } + + private static void WriteDWord(MemoryStream bytes, uint dword) + { + bytes.WriteByte((byte)dword); + bytes.WriteByte((byte)(dword >> 8)); + bytes.WriteByte((byte)(dword >> 16)); + bytes.WriteByte((byte)(dword >> 24)); + } + + private static void WriteCategory(MemoryStream bytes, ColorCategory category) + { + // |------------------------Category---------------------------|--Items... + // |----------------Category GUID------------------|-Item Count|-- + // ,85,56,a0,75,a8,00,ed,4d,ba,e5,e7,a5,0b,fa,92,9a,2e,00,00,00,-- + + WriteGuid(bytes, category.Guid); + + WriteDWord(bytes, (uint)category.Colors.Length); + + foreach (var color in category.Colors) + { + WriteColor(bytes, color); + } + + return; + + static void WriteGuid(MemoryStream bytes, Guid guid) + { + bytes.Write(guid.ToByteArray(), 0, 16); + } + } + + private static void WriteColor(MemoryStream bytes, ColorItem color) + { + // |-------------------------Item:Punctuation---------------------| + // |Name Length|-------------Name---------------|CT|CT|-ColorRef--| + // ,0b,00,00,00,70,75,6e,63,74,75,61,74,69,6f,6e,00,01,00,00,00,ff, + + WriteDWord(bytes, (uint)color.Name.Length); + + bytes.Write(Encoding.ASCII.GetBytes(color.Name), 0, color.Name.Length); + + bytes.WriteByte((byte)color.BackgroundType); + + if (color.Background.HasValue) + { + var background = color.Background.Value; + + // Add back a fully opaque alpha value for RGB colors + if (color.BackgroundType == __VSCOLORTYPE.CT_RAW) + { + background |= FullyOpaqueAlpha; + } + + WriteDWord(bytes, background); + } + + bytes.WriteByte((byte)color.ForegroundType); + + if (color.Foreground.HasValue) + { + var foreground = color.Foreground.Value; + + // Add back a fully opaque alpha value for RGB colors + if (color.ForegroundType == __VSCOLORTYPE.CT_RAW) + { + foreground |= FullyOpaqueAlpha; + } + + WriteDWord(bytes, foreground); + } + + return; + } + } + } +} diff --git a/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.Settings.cs b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.Settings.cs new file mode 100644 index 0000000000000000000000000000000000000000..ffbfdaf554c93c6397d6dd05ca44c206ccbabbe9 --- /dev/null +++ b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.Settings.cs @@ -0,0 +1,169 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.IO; +using System.Reflection; +using Microsoft.CodeAnalysis.Editor.ColorSchemes; +using Microsoft.CodeAnalysis.Editor.Options; +using Microsoft.CodeAnalysis.Options; +using Microsoft.VisualStudio.Shell; +using Microsoft.VisualStudio.Shell.Interop; +using NativeMethods = Microsoft.CodeAnalysis.Editor.Wpf.Utilities.NativeMethods; + +namespace Microsoft.VisualStudio.LanguageServices.ColorSchemes +{ + internal partial class ColorSchemeApplier + { + private class ColorSchemeSettings + { + private readonly IServiceProvider _serviceProvider; + private readonly VisualStudioWorkspace _workspace; + + public HasThemeBeenDefaultedIndexer HasThemeBeenDefaulted { get; } + + public ColorSchemeSettings(IServiceProvider serviceProvider, VisualStudioWorkspace visualStudioWorkspace) + { + _serviceProvider = serviceProvider; + _workspace = visualStudioWorkspace; + + HasThemeBeenDefaulted = new HasThemeBeenDefaultedIndexer(visualStudioWorkspace); + } + + public ImmutableDictionary GetColorSchemes() + { + return new[] + { + SchemeName.Enhanced, + SchemeName.VisualStudio2017 + }.ToImmutableDictionary(name => name, name => GetColorScheme(name)); + } + + private ColorScheme GetColorScheme(SchemeName schemeName) + { + using var colorSchemeStream = GetColorSchemeXmlStream(schemeName); + return ColorSchemeReader.ReadColorScheme(colorSchemeStream); + } + + private Stream GetColorSchemeXmlStream(SchemeName schemeName) + { + var assembly = Assembly.GetExecutingAssembly(); + return assembly.GetManifestResourceStream($"Microsoft.VisualStudio.LanguageServices.ColorSchemes.{schemeName}.xml"); + } + + public void ApplyColorScheme(SchemeName schemeName, ImmutableArray registryItems) + { + using var registryRoot = VSRegistry.RegistryRoot(_serviceProvider, __VsLocalRegistryType.RegType_Configuration, writable: true); + + foreach (var item in registryItems) + { + using var itemKey = registryRoot.CreateSubKey(item.SectionName); + itemKey.SetValue(item.ValueName, item.ValueData); + } + + _workspace.SetOptions(_workspace.Options.WithChangedOption(ColorSchemeOptions.AppliedColorScheme, schemeName)); + + // Broadcast that system color settings have changed to force the ColorThemeService to reload colors. + NativeMethods.PostMessage(NativeMethods.HWND_BROADCAST, NativeMethods.WM_SYSCOLORCHANGE, wparam: IntPtr.Zero, lparam: IntPtr.Zero); + } + + public SchemeName GetAppliedColorScheme() + { + var schemeName = _workspace.Options.GetOption(ColorSchemeOptions.AppliedColorScheme); + return schemeName != SchemeName.None + ? schemeName + : ColorSchemeOptions.AppliedColorScheme.DefaultValue; + } + + public SchemeName GetConfiguredColorScheme() + { + var schemeName = _workspace.Options.GetOption(ColorSchemeOptions.ColorScheme); + return schemeName != SchemeName.None + ? schemeName + : ColorSchemeOptions.ColorScheme.DefaultValue; + } + + public void MigrateToColorSchemeSetting(bool isThemeCustomized) + { + // Get the preview feature flag value. + var useEnhancedColorsSetting = _workspace.Options.GetOption(ColorSchemeOptions.LegacyUseEnhancedColors); + + // Return if we have already migrated. + if (useEnhancedColorsSetting == ColorSchemeOptions.UseEnhancedColors.Migrated) + { + return; + } + + // Since we did not apply enhanced colors if the theme had been customized, default customized themes to classic colors. + var colorScheme = (useEnhancedColorsSetting != ColorSchemeOptions.UseEnhancedColors.DoNotUse && !isThemeCustomized) + ? SchemeName.Enhanced + : SchemeName.VisualStudio2017; + + _workspace.SetOptions(_workspace.Options.WithChangedOption(ColorSchemeOptions.ColorScheme, colorScheme)); + _workspace.SetOptions(_workspace.Options.WithChangedOption(ColorSchemeOptions.LegacyUseEnhancedColors, ColorSchemeOptions.UseEnhancedColors.Migrated)); + } + + public Guid GetThemeId() + { + // Look up the value from the new roamed theme property first and + // fallback to the original roamed theme property if that fails. + var themeIdString = _workspace.Options.GetOption(VisualStudioColorTheme.CurrentThemeNew) + ?? _workspace.Options.GetOption(VisualStudioColorTheme.CurrentTheme); + + return Guid.TryParse(themeIdString, out var themeId) ? themeId : Guid.Empty; + } + + private static class VisualStudioColorTheme + { + private const string CurrentThemeValueName = "Microsoft.VisualStudio.ColorTheme"; + private const string CurrentThemeValueNameNew = "Microsoft.VisualStudio.ColorThemeNew"; + + public static readonly Option CurrentTheme = new Option(nameof(VisualStudioColorTheme), + nameof(CurrentTheme), + defaultValue: null, + storageLocations: new RoamingProfileStorageLocation(CurrentThemeValueName)); + + public static readonly Option CurrentThemeNew = new Option(nameof(VisualStudioColorTheme), + nameof(CurrentThemeNew), + defaultValue: null, + storageLocations: new RoamingProfileStorageLocation(CurrentThemeValueNameNew)); + } + + public sealed class HasThemeBeenDefaultedIndexer + { + private static readonly ImmutableDictionary> HasThemeBeenDefaultedOptions = new Dictionary> + { + [KnownColorThemes.Blue] = CreateHasThemeBeenDefaultedOption(KnownColorThemes.Blue), + [KnownColorThemes.Light] = CreateHasThemeBeenDefaultedOption(KnownColorThemes.Light), + [KnownColorThemes.Dark] = CreateHasThemeBeenDefaultedOption(KnownColorThemes.Dark), + [KnownColorThemes.AdditionalContrast] = CreateHasThemeBeenDefaultedOption(KnownColorThemes.AdditionalContrast) + }.ToImmutableDictionary(); + + private static Option CreateHasThemeBeenDefaultedOption(Guid themeId) + { + return new Option(nameof(ColorSchemeApplier), $"{nameof(HasThemeBeenDefaultedOptions)}{themeId}", defaultValue: false, + storageLocations: new RoamingProfileStorageLocation($@"Roslyn\ColorSchemeApplier\HasThemeBeenDefaulted\{themeId}")); + } + + private readonly VisualStudioWorkspace _workspace; + + public HasThemeBeenDefaultedIndexer(VisualStudioWorkspace visualStudioWorkspace) + { + _workspace = visualStudioWorkspace; + } + + public bool this[Guid themeId] + { + get => _workspace.Options.GetOption(HasThemeBeenDefaultedOptions[themeId]); + + set => _workspace.SetOptions(_workspace.Options.WithChangedOption(HasThemeBeenDefaultedOptions[themeId], value)); + } + } + } + } +} diff --git a/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.cs b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.cs new file mode 100644 index 0000000000000000000000000000000000000000..fa330ebeab86f02da7f95d86aecc7d18ccab1cb3 --- /dev/null +++ b/src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.cs @@ -0,0 +1,181 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#nullable enable + +using System; +using System.Collections.Immutable; +using System.ComponentModel; +using System.ComponentModel.Composition; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; +using System.Windows; +using Microsoft.CodeAnalysis.Editor.ColorSchemes; +using Microsoft.CodeAnalysis.Editor.Options; +using Microsoft.CodeAnalysis.Editor.Shared.Utilities; +using Microsoft.CodeAnalysis.Host.Mef; +using Microsoft.VisualStudio.PlatformUI; +using Microsoft.VisualStudio.Settings; +using Microsoft.VisualStudio.Shell; +using Microsoft.VisualStudio.Shell.Interop; +using Roslyn.Utilities; +using Task = System.Threading.Tasks.Task; + +namespace Microsoft.VisualStudio.LanguageServices.ColorSchemes +{ + [Export(typeof(ColorSchemeApplier))] + internal sealed partial class ColorSchemeApplier : ForegroundThreadAffinitizedObject, IDisposable + { + private readonly IServiceProvider _serviceProvider; + private readonly ColorSchemeSettings _settings; + private readonly ImmutableDictionary _colorSchemes; + private readonly AsyncLazy>> _colorSchemeRegistryItems; + private readonly ForegroundColorDefaulter _colorDefaulter; + + private bool _isInitialized = false; + private bool _isDisposed = false; + + [ImportingConstructor] + [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)] + public ColorSchemeApplier( + IThreadingContext threadingContext, + VisualStudioWorkspace visualStudioWorkspace, + [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider) + : base(threadingContext) + { + _serviceProvider = serviceProvider; + + _settings = new ColorSchemeSettings(_serviceProvider, visualStudioWorkspace); + _colorSchemes = _settings.GetColorSchemes(); + _colorDefaulter = new ForegroundColorDefaulter(threadingContext, serviceProvider, _settings, _colorSchemes); + + _colorSchemeRegistryItems = new AsyncLazy>>(GetColorSchemeRegistryItemsAsync, cacheResult: true); + } + + public void Dispose() + { + // Dispose is invoked when the MEF container is disposed. This will be our + // signal that VS is shutting down and we shouldn't try and perform any work. + _isDisposed = true; + } + + public void Initialize() + { + AssertIsForeground(); + + if (!_isInitialized) + { + _isInitialized = true; + + _ = _colorSchemeRegistryItems.GetValueAsync(CancellationToken.None); + + // We need to update the theme whenever the Editor Color Scheme setting changes or the VS Theme changes. + var settingsManager = (ISettingsManager)_serviceProvider.GetService(typeof(SVsSettingsPersistenceManager)); + settingsManager.GetSubset(ColorSchemeOptions.ColorSchemeSettingKey).SettingChangedAsync += ColorSchemeChanged; + + VSColorTheme.ThemeChanged += VSColorTheme_ThemeChanged; + + // Try to migrate the `useEnhancedColorsSetting` to the new `ColorScheme` setting. + _settings.MigrateToColorSchemeSetting(IsThemeCustomized()); + + QueueColorSchemeUpdate(themeChanged: true); + } + } + + private Task>> GetColorSchemeRegistryItemsAsync(CancellationToken arg) + { + return SpecializedTasks.FromResult(_colorSchemes.ToImmutableDictionary(kvp => kvp.Key, kvp => RegistryItemConverter.Convert(kvp.Value))); + } + + private void VSColorTheme_ThemeChanged(ThemeChangedEventArgs e) + { + QueueColorSchemeUpdate(themeChanged: true); + } + + private async Task ColorSchemeChanged(object sender, PropertyChangedEventArgs args) + { + await QueueColorSchemeUpdate(); + } + + private IVsTask QueueColorSchemeUpdate(bool themeChanged = false) + { + // Wait until things have settled down from the theme change, since we will potentially be changing theme colors. + return VsTaskLibraryHelper.CreateAndStartTask( + VsTaskLibraryHelper.ServiceInstance, VsTaskRunContext.UIThreadBackgroundPriority, () => UpdateColorScheme(themeChanged)); + } + + private void UpdateColorScheme(bool themeChanged = false) + { + AssertIsForeground(); + + // Simply return if we were queued to run during shutdown or the user is in High Contrast mode. + if (_isDisposed || SystemParameters.HighContrast) + { + return; + } + + if (themeChanged) + { + // Default Foreground colors if they match our theme colors. + _colorDefaulter.DefaultClassifications(); + } + + // If the color scheme has updated, apply the scheme. + if (TryGetUpdatedColorScheme(out var colorScheme)) + { + var colorSchemeRegistryItems = _colorSchemeRegistryItems.GetValue(CancellationToken.None); + _settings.ApplyColorScheme(colorScheme.Value, colorSchemeRegistryItems[colorScheme.Value]); + } + } + + /// + /// Returns true if the color scheme needs updating. + /// + /// The color scheme to update with. + private bool TryGetUpdatedColorScheme([NotNullWhen(returnValue: true)]out SchemeName? colorScheme) + { + // The color scheme that is currently applied to the registry + var appliedColorScheme = _settings.GetAppliedColorScheme(); + + // If this is a supported theme then, use the users configured scheme, otherwise fallback to the VS 2017. + // Custom themes would be based on the MEF exported color information for classifications which matches the VS 2017 theme. + var configuredColorScheme = IsSupportedTheme() + ? _settings.GetConfiguredColorScheme() + : SchemeName.VisualStudio2017; + + if (appliedColorScheme == configuredColorScheme) + { + colorScheme = null; + return false; + } + + colorScheme = configuredColorScheme; + return true; + } + + public bool IsSupportedTheme() + { + return IsSupportedTheme(_settings.GetThemeId()); + } + + public bool IsSupportedTheme(Guid themeId) + { + return _colorSchemes.Values.Any( + scheme => scheme.Themes.Any( + theme => theme.Guid == themeId)); + } + + public bool IsThemeCustomized() + { + return !_colorDefaulter.AreClassificationsDefaultable(_settings.GetThemeId()); + } + + // NOTE: This service is not public or intended for use by teams/individuals outside of Microsoft. Any data stored is subject to deletion without warning. + [Guid("9B164E40-C3A2-4363-9BC5-EB4039DEF653")] + private class SVsSettingsPersistenceManager { } + } +} diff --git a/src/VisualStudio/Core/Def/Implementation/Experimentation/EnhancedColorExperiment.cs b/src/VisualStudio/Core/Def/Implementation/Experimentation/EnhancedColorExperiment.cs deleted file mode 100644 index 51dc0bedf59c09f35d75aa156a299b39ca1af79e..0000000000000000000000000000000000000000 --- a/src/VisualStudio/Core/Def/Implementation/Experimentation/EnhancedColorExperiment.cs +++ /dev/null @@ -1,417 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Collections.ObjectModel; -using System.ComponentModel; -using System.ComponentModel.Composition; -using System.Linq; -using System.Runtime.InteropServices; -using System.Windows; -using EnvDTE; -using Microsoft.CodeAnalysis.Classification; -using Microsoft.CodeAnalysis.Editor; -using Microsoft.CodeAnalysis.Editor.Shared.Utilities; -using Microsoft.VisualStudio.PlatformUI; -using Microsoft.VisualStudio.Settings; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Text; -using Microsoft.VisualStudio.Text.Editor; -using Microsoft.VisualStudio.Utilities; -using Task = System.Threading.Tasks.Task; - -namespace Microsoft.VisualStudio.LanguageServices.Experimentation -{ - [Export(typeof(IWpfTextViewConnectionListener))] - [ContentType(ContentTypeNames.RoslynContentType)] - [TextViewRole(PredefinedTextViewRoles.Analyzable)] - internal class EnhancedColorExperiment : ForegroundThreadAffinitizedObject, IWpfTextViewConnectionListener, IDisposable - { - private const string UseEnhancedColorsSetting = "WindowManagement.Options.UseEnhancedColorsForManagedLanguages"; - - private readonly IServiceProvider _serviceProvider; - - private EnhancedColorApplier _colorApplier; - private ISettingsManager _settingsManager; - - private bool _isDisposed = false; - private bool _hasTextViewOpened; - - [ImportingConstructor] - [Obsolete] - public EnhancedColorExperiment(IThreadingContext threadingContext, [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider) - : base(threadingContext) - { - _serviceProvider = serviceProvider; - } - - public void Dispose() - { - // Dispose is invoked when the MEF container is disposed. This will be our - // signal that VS is shutting down and we shouldn't try and perform any work. - _isDisposed = true; - } - - public void SubjectBuffersConnected(IWpfTextView textView, ConnectionReason reason, Collection subjectBuffers) - { - AssertIsForeground(); - - if (!_hasTextViewOpened) - { - _hasTextViewOpened = true; - - _colorApplier = new EnhancedColorApplier(_serviceProvider); - _settingsManager = (ISettingsManager)_serviceProvider.GetService(typeof(SVsSettingsPersistenceManager)); - - // We need to update the theme whenever the Preview Setting changes or the VS Theme changes. - _settingsManager.GetSubset(UseEnhancedColorsSetting).SettingChangedAsync += UseEnhancedColorsSettingChangedAsync; - VSColorTheme.ThemeChanged += VSColorTheme_ThemeChanged; - - VsTaskLibraryHelper.CreateAndStartTask(VsTaskLibraryHelper.ServiceInstance, VsTaskRunContext.UIThreadIdlePriority, UpdateThemeColors); - } - } - - public void SubjectBuffersDisconnected(IWpfTextView textView, ConnectionReason reason, Collection subjectBuffers) - { - } - - private void VSColorTheme_ThemeChanged(ThemeChangedEventArgs e) - { - // Wait until things have settled down from the theme change, since we will potentially be changing theme colors. - VsTaskLibraryHelper.CreateAndStartTask(VsTaskLibraryHelper.ServiceInstance, VsTaskRunContext.UIThreadIdlePriority, UpdateThemeColors); - } - - private async Task UseEnhancedColorsSettingChangedAsync(object sender, PropertyChangedEventArgs args) - { - await VsTaskLibraryHelper.CreateAndStartTask(VsTaskLibraryHelper.ServiceInstance, VsTaskRunContext.UIThreadIdlePriority, UpdateThemeColors); - } - - private void UpdateThemeColors() - { - AssertIsForeground(); - - // Simply return if we were queued to run during shutdown. - if (_isDisposed) - { - return; - } - - // We do not want to make any changes while in high contrast mode. - if (SystemParameters.HighContrast) - { - return; - } - - var currentThemeId = GetThemeId(); - - // Get the preview feature flag value. - var useEnhancedColorsSetting = _settingsManager.GetValueOrDefault(UseEnhancedColorsSetting, defaultValue: 0); - - // useEnhancedColorsSetting - // 0 -> use enhanced colors. - // 1 -> use enhanced colors. - // -1 -> don't use enhanced colors. - - // Try to set colors appropriately. We will only set colors if the user - // has not customized colors and we consider ourselves the color owner. - if (useEnhancedColorsSetting != -1) - { - _colorApplier.TrySetEnhancedColors(currentThemeId); - } - else - { - _colorApplier.TrySetDefaultColors(currentThemeId); - } - } - - private Guid GetThemeId() - { - const string CurrentThemeValueName = "Microsoft.VisualStudio.ColorTheme"; - const string CurrentThemeValueNameNew = "Microsoft.VisualStudio.ColorThemeNew"; - - // Look up the value from the new roamed theme property first and - // fallback to the original roamed theme property if that fails. - var themeIdString = _settingsManager.GetValueOrDefault(CurrentThemeValueNameNew, null) - ?? _settingsManager.GetValueOrDefault(CurrentThemeValueName, null); - - return Guid.TryParse(themeIdString, out var themeId) ? themeId : Guid.Empty; - } - - // NOTE: This service is not public or intended for use by teams/individuals outside of Microsoft. Any data stored is subject to deletion without warning. - [Guid("9B164E40-C3A2-4363-9BC5-EB4039DEF653")] - private class SVsSettingsPersistenceManager { }; - - private sealed class EnhancedColorApplier - { - private readonly DTE _dte; - - private const uint DefaultForegroundColor = 0x01000000u; - private const uint DefaultBackgroundColor = 0x01000001u; - - private const uint AutomaticForegroundColor = 0x02000000u; - private const uint AutomaticBackgroundColor = 0x02000001u; - - // Colors are in 0x00BBGGRR - private const uint DarkThemePlainText = 0x00DCDCDCu; - private const uint DarkThemeIdentifier = DarkThemePlainText; - private const uint DarkThemeOperator = 0x00B4B4B4u; - private const uint DarkThemeKeyword = 0x00D69C56u; - private const uint DarkThemeClass = 0x00B0C94Eu; - private const uint DarkThemeEnum = 0x00A3D7B8; - private const uint DarkThemeLocalBlue = 0x00FEDC9Cu; - private const uint DarkThemeMethodYellow = 0x00AADCDCu; - private const uint DarkThemeControlKeywordPurple = 0x00DFA0D8u; - private const uint DarkThemeStructMint = 0x0091C686u; - - private const uint LightThemePlainText = 0x00000000u; - private const uint LightThemeIdentifier = LightThemePlainText; - private const uint LightThemeOperator = LightThemePlainText; - private const uint LightThemeKeyword = 0x00FF0000u; - private const uint LightThemeClass = 0x00AF912Bu; - private const uint LightThemeLocalBlue = 0x007F371Fu; - private const uint LightThemeMethodYellow = 0x001F5374u; - private const uint LightThemeControlKeywordPurple = 0x00C4088Fu; - - private const uint ExtraContrastThemeClass = 0x556506; - - public const string PlainTextClassificationTypeName = "plain text"; - - // Dark Theme - // We also check OperatorOverloaded and ControlKeyword for whether they are the PlainText color. - // This is because when the "Use Defaults" is invoked from the Fonts and Colors options page the - // color reported back will be the PlainText color since these Classifications do not currently have - // colors defined in the PKGDEF. The other identifier types do not either but the Identifier color - // happens to be the same as PlainText so an extra check isn't necessary. StructName doesn't need - // an additional check because it has a color defined in the PKGDEF. The Editor is smart enough - // to follow the BaseClassification hierarchy and render the colors appropriately. - private static readonly ImmutableDictionary> DarkThemeDefaultForeground = - new Dictionary>() - { - [PlainTextClassificationTypeName] = ImmutableArray.Create(DarkThemePlainText), - [ClassificationTypeNames.ClassName] = ImmutableArray.Create(DarkThemeClass), - [ClassificationTypeNames.ConstantName] = ImmutableArray.Create(DarkThemePlainText), - [ClassificationTypeNames.ControlKeyword] = ImmutableArray.Create(DarkThemePlainText, DarkThemeKeyword), - [ClassificationTypeNames.DelegateName] = ImmutableArray.Create(DarkThemeClass), - [ClassificationTypeNames.EnumMemberName] = ImmutableArray.Create(DarkThemePlainText), - [ClassificationTypeNames.EnumName] = ImmutableArray.Create(DarkThemeEnum), - [ClassificationTypeNames.EventName] = ImmutableArray.Create(DarkThemePlainText), - [ClassificationTypeNames.ExtensionMethodName] = ImmutableArray.Create(DarkThemePlainText), - [ClassificationTypeNames.FieldName] = ImmutableArray.Create(DarkThemePlainText), - [ClassificationTypeNames.Identifier] = ImmutableArray.Create(DarkThemePlainText), - [ClassificationTypeNames.InterfaceName] = ImmutableArray.Create(DarkThemeEnum), - [ClassificationTypeNames.Keyword] = ImmutableArray.Create(DarkThemeKeyword), - [ClassificationTypeNames.LabelName] = ImmutableArray.Create(DarkThemePlainText), - [ClassificationTypeNames.LocalName] = ImmutableArray.Create(DarkThemePlainText), - [ClassificationTypeNames.MethodName] = ImmutableArray.Create(DarkThemePlainText), - [ClassificationTypeNames.ModuleName] = ImmutableArray.Create(DarkThemeClass), - [ClassificationTypeNames.NamespaceName] = ImmutableArray.Create(DarkThemePlainText), - [ClassificationTypeNames.Operator] = ImmutableArray.Create(DarkThemeOperator), - [ClassificationTypeNames.OperatorOverloaded] = ImmutableArray.Create(DarkThemePlainText, DarkThemeOperator), - [ClassificationTypeNames.ParameterName] = ImmutableArray.Create(DarkThemePlainText), - [ClassificationTypeNames.PropertyName] = ImmutableArray.Create(DarkThemePlainText), - [ClassificationTypeNames.StructName] = ImmutableArray.Create(DarkThemeClass), - [ClassificationTypeNames.TypeParameterName] = ImmutableArray.Create(DarkThemeEnum), - }.ToImmutableDictionary(); - - // Light or Blue themes - // Same as above, we also check ControlKeyword for whether it is the PlainText color. OperatorOverload and - // the other Identifier types do not need an additional check because their default color is the same - // as PlainText. - private static readonly ImmutableDictionary> LightThemeDefaultForeground = - new Dictionary>() - { - [PlainTextClassificationTypeName] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.ClassName] = ImmutableArray.Create(LightThemeClass, ExtraContrastThemeClass), - [ClassificationTypeNames.ConstantName] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.ControlKeyword] = ImmutableArray.Create(LightThemePlainText, LightThemeKeyword), - [ClassificationTypeNames.DelegateName] = ImmutableArray.Create(LightThemeClass, ExtraContrastThemeClass), - [ClassificationTypeNames.EnumMemberName] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.EnumName] = ImmutableArray.Create(LightThemeClass, ExtraContrastThemeClass), - [ClassificationTypeNames.EventName] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.ExtensionMethodName] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.FieldName] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.Identifier] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.InterfaceName] = ImmutableArray.Create(LightThemeClass, ExtraContrastThemeClass), - [ClassificationTypeNames.Keyword] = ImmutableArray.Create(LightThemeKeyword), - [ClassificationTypeNames.LabelName] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.LocalName] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.MethodName] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.ModuleName] = ImmutableArray.Create(LightThemeClass, ExtraContrastThemeClass), - [ClassificationTypeNames.NamespaceName] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.Operator] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.OperatorOverloaded] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.ParameterName] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.PropertyName] = ImmutableArray.Create(LightThemePlainText), - [ClassificationTypeNames.StructName] = ImmutableArray.Create(LightThemeClass, ExtraContrastThemeClass), - [ClassificationTypeNames.TypeParameterName] = ImmutableArray.Create(LightThemeClass, ExtraContrastThemeClass), - }.ToImmutableDictionary(); - - // When we build our classification map we will need to look at all the classifications with foreground color as - // well as the static symbol classification that does not have a foreground. - private static readonly ImmutableArray Classifications = - DarkThemeDefaultForeground.Keys.Concat(new[] { ClassificationTypeNames.StaticSymbol }).ToImmutableArray(); - - public EnhancedColorApplier(IServiceProvider serviceProvider) - { - _dte = (DTE)serviceProvider.GetService(typeof(DTE)); - } - - public void TrySetDefaultColors(Guid themeId) - { - var colorItemMap = GetColorItemMap(); - - // We consider ourselves the owner of the colors and set - // default colors only when every classification we are - // updating matches our enhanced color for the current theme. - if (!AreColorsEnhanced(colorItemMap, themeId)) - { - return; - } - - // Since we only enhance certain classifications, we only return the colors that we enhanced back to their defaults. - if (themeId == KnownColorThemes.Dark) - { - // Dark Theme - UpdateColorItem(colorItemMap, ClassificationTypeNames.LocalName, DarkThemeIdentifier); - UpdateColorItem(colorItemMap, ClassificationTypeNames.ParameterName, DarkThemeIdentifier); - UpdateColorItem(colorItemMap, ClassificationTypeNames.MethodName, DarkThemeIdentifier); - UpdateColorItem(colorItemMap, ClassificationTypeNames.ExtensionMethodName, DarkThemeIdentifier); - UpdateColorItem(colorItemMap, ClassificationTypeNames.OperatorOverloaded, DarkThemeOperator); - UpdateColorItem(colorItemMap, ClassificationTypeNames.ControlKeyword, DarkThemeKeyword); - UpdateColorItem(colorItemMap, ClassificationTypeNames.StructName, DarkThemeClass); - UpdateColorItem(colorItemMap, ClassificationTypeNames.StaticSymbol, DefaultForegroundColor, DefaultBackgroundColor); - } - else - { - // Light or Blue themes - UpdateColorItem(colorItemMap, ClassificationTypeNames.LocalName, LightThemeIdentifier); - UpdateColorItem(colorItemMap, ClassificationTypeNames.ParameterName, LightThemeIdentifier); - UpdateColorItem(colorItemMap, ClassificationTypeNames.MethodName, LightThemeIdentifier); - UpdateColorItem(colorItemMap, ClassificationTypeNames.ExtensionMethodName, LightThemeIdentifier); - UpdateColorItem(colorItemMap, ClassificationTypeNames.OperatorOverloaded, LightThemeOperator); - UpdateColorItem(colorItemMap, ClassificationTypeNames.ControlKeyword, LightThemeKeyword); - UpdateColorItem(colorItemMap, ClassificationTypeNames.StaticSymbol, DefaultForegroundColor, DefaultBackgroundColor); - } - } - - public void TrySetEnhancedColors(Guid themeId) - { - var colorItemMap = GetColorItemMap(); - - // We consider ourselves the owner of the colors and set - // enhanced colors only when every classification we are - // updating matches their default color for the current theme. - if (!AreColorsDefaulted(colorItemMap, themeId)) - { - return; - } - - if (themeId == KnownColorThemes.Dark) - { - // Dark Theme - UpdateColorItem(colorItemMap, ClassificationTypeNames.LocalName, DarkThemeLocalBlue); - UpdateColorItem(colorItemMap, ClassificationTypeNames.ParameterName, DarkThemeLocalBlue); - UpdateColorItem(colorItemMap, ClassificationTypeNames.MethodName, DarkThemeMethodYellow); - UpdateColorItem(colorItemMap, ClassificationTypeNames.ExtensionMethodName, DarkThemeMethodYellow); - UpdateColorItem(colorItemMap, ClassificationTypeNames.OperatorOverloaded, DarkThemeMethodYellow); - UpdateColorItem(colorItemMap, ClassificationTypeNames.ControlKeyword, DarkThemeControlKeywordPurple); - UpdateColorItem(colorItemMap, ClassificationTypeNames.StructName, DarkThemeStructMint); - UpdateColorItem(colorItemMap, ClassificationTypeNames.StaticSymbol, DefaultForegroundColor, DefaultBackgroundColor); - } - else - { - // Light or Blue themes - UpdateColorItem(colorItemMap, ClassificationTypeNames.LocalName, LightThemeLocalBlue); - UpdateColorItem(colorItemMap, ClassificationTypeNames.ParameterName, LightThemeLocalBlue); - UpdateColorItem(colorItemMap, ClassificationTypeNames.MethodName, LightThemeMethodYellow); - UpdateColorItem(colorItemMap, ClassificationTypeNames.ExtensionMethodName, LightThemeMethodYellow); - UpdateColorItem(colorItemMap, ClassificationTypeNames.OperatorOverloaded, LightThemeMethodYellow); - UpdateColorItem(colorItemMap, ClassificationTypeNames.ControlKeyword, LightThemeControlKeywordPurple); - UpdateColorItem(colorItemMap, ClassificationTypeNames.StaticSymbol, DefaultForegroundColor, DefaultBackgroundColor); - } - } - - private Dictionary GetColorItemMap() - { - var props = _dte.Properties["FontsAndColors", "TextEditor"]; - var prop = props.Item("FontsAndColorsItems"); - var fontsAndColorsItems = (FontsAndColorsItems)prop.Object; - - var colorItemMap = Classifications.ToDictionary( - classification => classification, - classification => fontsAndColorsItems.Item(classification)); - - return colorItemMap; - } - - private void UpdateColorItem(IDictionary colorItemMap, string classification, uint foreground, uint background = DefaultBackgroundColor, bool isBold = false) - { - colorItemMap[classification].Foreground = foreground; - colorItemMap[classification].Background = background; - colorItemMap[classification].Bold = isBold; - } - - /// - /// Determines if the default colors are applied for the current theme. This is how we determine - /// if the default colors are applied for the current theme. - /// - private bool AreColorsDefaulted(Dictionary colorItemMap, Guid themeId) - { - var themeDefaultForeground = themeId == KnownColorThemes.Dark - ? DarkThemeDefaultForeground // Dark Theme - : LightThemeDefaultForeground; // Light or Blue themes - - // For all theme classifications ensure the foreground color matches one of the defaults. - return themeDefaultForeground.Keys.All( - classification => themeDefaultForeground[classification].Any( - themeColor => IsDefaultColor(colorItemMap, classification, themeColor))); - } - - private bool IsDefaultColor(Dictionary colorItemMap, string classification, uint themeColor) - { - // Without visiting the Font and Colors options dialog, the reported colors for - // classifications that do not export a color, have a color defined in the PKGDEF, - // or have a custom color set will be Black (0x00000000) for the Foreground and - // White (0x00FFFFF) for the Background. We will additionally check the foreground - // against Black and DefaultForegroundColor for completeness. - - var foreground = colorItemMap[classification].Foreground; - return foreground == themeColor || - foreground == 0 || - foreground == DefaultForegroundColor; - } - - /// - /// Determines if our enhanced colors are applied for the current theme. This is how we determine - /// if we are the color owner when trying to set default colors. - /// - private bool AreColorsEnhanced(Dictionary colorItemMap, Guid themeId) - { - if (themeId == KnownColorThemes.Dark) - { - // Dark Theme - return colorItemMap[ClassificationTypeNames.LocalName].Foreground == DarkThemeLocalBlue && - colorItemMap[ClassificationTypeNames.ParameterName].Foreground == DarkThemeLocalBlue && - colorItemMap[ClassificationTypeNames.MethodName].Foreground == DarkThemeMethodYellow && - colorItemMap[ClassificationTypeNames.ExtensionMethodName].Foreground == DarkThemeMethodYellow && - colorItemMap[ClassificationTypeNames.OperatorOverloaded].Foreground == DarkThemeMethodYellow && - colorItemMap[ClassificationTypeNames.ControlKeyword].Foreground == DarkThemeControlKeywordPurple && - colorItemMap[ClassificationTypeNames.StructName].Foreground == DarkThemeStructMint; - } - else - { - // Light or Blue themes - return colorItemMap[ClassificationTypeNames.LocalName].Foreground == LightThemeLocalBlue && - colorItemMap[ClassificationTypeNames.ParameterName].Foreground == LightThemeLocalBlue && - colorItemMap[ClassificationTypeNames.MethodName].Foreground == LightThemeMethodYellow && - colorItemMap[ClassificationTypeNames.ExtensionMethodName].Foreground == LightThemeMethodYellow && - colorItemMap[ClassificationTypeNames.OperatorOverloaded].Foreground == LightThemeMethodYellow && - colorItemMap[ClassificationTypeNames.ControlKeyword].Foreground == LightThemeControlKeywordPurple; - } - } - } - } -} diff --git a/src/VisualStudio/Core/Def/Microsoft.VisualStudio.LanguageServices.csproj b/src/VisualStudio/Core/Def/Microsoft.VisualStudio.LanguageServices.csproj index 8c8643811832722dfad92c85d6ed819db13d27dc..be0ac7c70c4a9e7f173a4ead0df5b7ab183f36e9 100644 --- a/src/VisualStudio/Core/Def/Microsoft.VisualStudio.LanguageServices.csproj +++ b/src/VisualStudio/Core/Def/Microsoft.VisualStudio.LanguageServices.csproj @@ -50,6 +50,8 @@ True VSPackage.resx + + diff --git a/src/VisualStudio/Core/Def/RoslynPackage.cs b/src/VisualStudio/Core/Def/RoslynPackage.cs index 5196ca2067e72f4062d0ee9961c61eac78ce8762..29ee3e50828ecc923e54652117196c85bd1daa28 100644 --- a/src/VisualStudio/Core/Def/RoslynPackage.cs +++ b/src/VisualStudio/Core/Def/RoslynPackage.cs @@ -19,6 +19,7 @@ using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Versions; using Microsoft.VisualStudio.ComponentModelHost; +using Microsoft.VisualStudio.LanguageServices.ColorSchemes; using Microsoft.VisualStudio.LanguageServices.Experimentation; using Microsoft.VisualStudio.LanguageServices.Implementation; using Microsoft.VisualStudio.LanguageServices.Implementation.Diagnostics; @@ -46,6 +47,7 @@ internal class RoslynPackage : AbstractPackage private VisualStudioWorkspace _workspace; private IComponentModel _componentModel; private RuleSetEventHandler _ruleSetEventHandler; + private ColorSchemeApplier _colorSchemeApplier; private IDisposable _solutionEventMonitor; protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress progress) @@ -96,6 +98,10 @@ private void InitializeColors() CodeAnalysisColors.BackgroundBrushKey = VsBrushes.CommandBarGradientBeginKey; CodeAnalysisColors.ButtonStyleKey = VsResourceKeys.ButtonStyleKey; CodeAnalysisColors.AccentBarColorKey = EnvironmentColors.FileTabInactiveDocumentBorderEdgeBrushKey; + + // Initialize ColorScheme support + _colorSchemeApplier = _componentModel.GetService(); + _colorSchemeApplier.Initialize(); } protected override async Task LoadComponentsAsync(CancellationToken cancellationToken) diff --git a/src/VisualStudio/Core/Def/ServicesVSResources.resx b/src/VisualStudio/Core/Def/ServicesVSResources.resx index 23d56c81fb0d3494949a10ababb6bd098d4e16ad..ec62c3fbcc06e181767bdc3af58fa80821fb3a5b 100644 --- a/src/VisualStudio/Core/Def/ServicesVSResources.resx +++ b/src/VisualStudio/Core/Def/ServicesVSResources.resx @@ -1148,9 +1148,6 @@ I agree to all of the foregoing: Select member - - Classifications - Prefer static local functions @@ -1160,9 +1157,6 @@ I agree to all of the foregoing: Show completion list - - Use enhanced colors for C# and Basic - Move to Namespace @@ -1363,4 +1357,19 @@ I agree to all of the foregoing: Value: + + Editor Color Scheme + + + Enhanced + + + Visual Studio 2017 + + + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + + + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + \ No newline at end of file diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf index adba093ad2d25e22bf38ca7f453910a14b5c76be..7563f3b11671f2acd02736cb8b3a9c604ccc83f7 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf @@ -82,11 +82,6 @@ Počítají se závislosti... - - Classifications - Klasifikace - - Code analysis completed for '{0}'. Dokončila se analýza kódu pro {0}. @@ -117,11 +112,26 @@ Aktuální dokument + + Editor Color Scheme + Editor Color Scheme + + + + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + + Element is not valid. Element není platný. + + Enhanced + Enhanced + + Entire solution Celé řešení @@ -527,6 +537,11 @@ Zobrazit seznam pro doplňování + + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + + Target Namespace: Cílový obor názvů: @@ -557,11 +572,6 @@ Použít režim kompatibility .editorconfig (vyžaduje restart) - - Use enhanced colors for C# and Basic - Pro C# a Basic používat rozšířené barvy - - Use expression body for lambdas Pro výrazy lambda používat text výrazu @@ -587,6 +597,11 @@ Hodnota vrácená voláním je implicitně ignorována. + + Visual Studio 2017 + Visual Studio 2017 + + We notice you suspended '{0}'. Reset keymappings to continue to navigate and refactor. Zaznamenali jsme, že jste pozastavili: {0}. Obnovte mapování klávesnice, abyste mohli pokračovat v navigaci a refactoringu. diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf index 2366c67005b1dc584b9382d650518a534e231ff9..6e332d14bd9df149d8638063eed4d7ffa5bbd1db 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf @@ -82,11 +82,6 @@ Abhängige Objekte werden berechnet... - - Classifications - Klassifizierungen - - Code analysis completed for '{0}'. Die Codeanalyse für "{0}" wurde abgeschlossen. @@ -117,11 +112,26 @@ Aktuelles Dokument + + Editor Color Scheme + Editor Color Scheme + + + + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + + Element is not valid. Das Element ist ungültig. + + Enhanced + Enhanced + + Entire solution Gesamte Projektmappe @@ -527,6 +537,11 @@ Vervollständigungsliste anzeigen + + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + + Target Namespace: Zielnamespace: @@ -557,11 +572,6 @@ .EDITORCONFIG-Kompatibilitätsmodus verwenden (Neustart erforderlich) - - Use enhanced colors for C# and Basic - Erweiterte Farben für C# und Basic verwenden - - Use expression body for lambdas Ausdruckskörper für Lambdaausdrücke verwenden @@ -587,6 +597,11 @@ Der vom Aufruf zurückgegebene Wert wird implizit ignoriert. + + Visual Studio 2017 + Visual Studio 2017 + + We notice you suspended '{0}'. Reset keymappings to continue to navigate and refactor. Wir haben festgestellt, dass Sie "{0}" angehalten haben. Setzen Sie die Tastenzuordnungen zurück, um Navigation und Umgestaltung fortzusetzen. diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf index 84b54990a54d9c1b47dcfb138accee69ab663d99..3dda707bbb911f530453071750771ed5b4d01f56 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf @@ -82,11 +82,6 @@ Calculando dependientes... - - Classifications - Clasificaciones - - Code analysis completed for '{0}'. El análisis de código se ha completado para "{0}". @@ -117,11 +112,26 @@ Documento actual + + Editor Color Scheme + Editor Color Scheme + + + + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + + Element is not valid. El elemento no es válido. + + Enhanced + Enhanced + + Entire solution Toda la solución @@ -527,6 +537,11 @@ Mostrar lista de finalización + + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + + Target Namespace: Espacio de nombres de destino: @@ -557,11 +572,6 @@ Usar el modo de compatibilidad .editorconfig (requiere reiniciar el equipo) - - Use enhanced colors for C# and Basic - Use los colores mejorados para C# y Basic - - Use expression body for lambdas Usar cuerpo de expresión para lambdas @@ -587,6 +597,11 @@ El valor devuelto por la invocación se omite implícitamente + + Visual Studio 2017 + Visual Studio 2017 + + We notice you suspended '{0}'. Reset keymappings to continue to navigate and refactor. Observamos que ha suspendido "{0}". Restablezca las asignaciones de teclado para continuar navegando y refactorizando. diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf index d92008705f4509c30c49c760b5dcb03ccdb3f2b5..dc7098bef502ad848d9e6245b88dc1cb3fd350f3 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf @@ -82,11 +82,6 @@ Calcul des dépendants... - - Classifications - Classifications - - Code analysis completed for '{0}'. Analyse du code effectuée pour '{0}'. @@ -117,11 +112,26 @@ Document en cours + + Editor Color Scheme + Editor Color Scheme + + + + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + + Element is not valid. L'élément n'est pas valide. + + Enhanced + Enhanced + + Entire solution Solution complète @@ -527,6 +537,11 @@ Afficher la liste de saisie semi-automatique + + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + + Target Namespace: Espace de noms cible : @@ -557,11 +572,6 @@ Utiliser le mode de compatibilité de .editorconfig (nécessite un redémarrage) - - Use enhanced colors for C# and Basic - Utiliser les couleurs améliorées en C# et Basic - - Use expression body for lambdas Utiliser un corps d'expression pour les expressions lambda @@ -587,6 +597,11 @@ La valeur retournée par invocation est implicitement ignorée + + Visual Studio 2017 + Visual Studio 2017 + + We notice you suspended '{0}'. Reset keymappings to continue to navigate and refactor. Nous avons remarqué que vous avez interrompu '{0}'. Réinitialisez la configuration du clavier pour continuer à naviguer et à refactoriser. diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf index be714b023edcdb5863baa941adef678c6308516d..9df08886410a240883f52c0e055df9b91df88a3d 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf @@ -82,11 +82,6 @@ Calcolo dei dipendenti... - - Classifications - Classificazioni - - Code analysis completed for '{0}'. Analisi codice completata per '{0}'. @@ -117,11 +112,26 @@ Documento corrente + + Editor Color Scheme + Editor Color Scheme + + + + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + + Element is not valid. L'elemento non è valido. + + Enhanced + Enhanced + + Entire solution Intera soluzione @@ -527,6 +537,11 @@ Mostra l'elenco di completamento + + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + + Target Namespace: Spazio dei nomi di destinazione: @@ -557,11 +572,6 @@ Usa la modalità di compatibilità di .editorconfig (richiede il riavvio) - - Use enhanced colors for C# and Basic - Usa colori migliorati per C# e Basic - - Use expression body for lambdas Usa il corpo dell'espressione per le espressioni lambda @@ -587,6 +597,11 @@ Il valore restituito dalla chiamata viene ignorato in modo implicito + + Visual Studio 2017 + Visual Studio 2017 + + We notice you suspended '{0}'. Reset keymappings to continue to navigate and refactor. È stato notato che '{0}' è stato sospeso. Reimpostare i mapping dei tasti per continuare a esplorare e a eseguire il refactoring. diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf index 8dfb7cc5777f91c241dee42be2737991be737a38..3253b4f604c064cb9458d08f4170b8deb599d66d 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf @@ -82,11 +82,6 @@ 依存を計算しています... - - Classifications - 分類 - - Code analysis completed for '{0}'. '{0}' のコード分析が完了しました。 @@ -117,11 +112,26 @@ 現在のドキュメント + + Editor Color Scheme + Editor Color Scheme + + + + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + + Element is not valid. 要素が有効ではありません。 + + Enhanced + Enhanced + + Entire solution ソリューション全体 @@ -527,6 +537,11 @@ 入力候補一覧の表示 + + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + + Target Namespace: ターゲット名前空間: @@ -557,11 +572,6 @@ .editorconfig 互換性モードを使用する (再起動が必要) - - Use enhanced colors for C# and Basic - C# および Basic 用に拡張された色を使用 - - Use expression body for lambdas ラムダに式本体を使用します @@ -587,6 +597,11 @@ 呼び出しによって返された値が暗黙的に無視されます + + Visual Studio 2017 + Visual Studio 2017 + + We notice you suspended '{0}'. Reset keymappings to continue to navigate and refactor. '{0}' が中断されました。キーマップをリセットして、移動とリファクターを続行してください。 diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf index 0c5c7816c323ea3f9697c29597b0e328477f43bc..83e1d4afe77feea860db75b0b5288b711aa901ce 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf @@ -82,11 +82,6 @@ 종속 항목을 계산하는 중... - - Classifications - 분류 - - Code analysis completed for '{0}'. '{0}'에 대한 코드 분석이 완료되었습니다. @@ -117,11 +112,26 @@ 현재 문서 + + Editor Color Scheme + Editor Color Scheme + + + + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + + Element is not valid. 요소가 잘못되었습니다. + + Enhanced + Enhanced + + Entire solution 전체 솔루션 @@ -527,6 +537,11 @@ 완성 목록 표시 + + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + + Target Namespace: 대상 네임스페이스: @@ -557,11 +572,6 @@ .editorconfig 호환성 모드 사용(다시 시작해야 함) - - Use enhanced colors for C# and Basic - C# 및 Basic용 향상된 색 사용 - - Use expression body for lambdas 람다에 식 본문 사용 @@ -587,6 +597,11 @@ 호출로 반환된 값은 암시적으로 무시됩니다. + + Visual Studio 2017 + Visual Studio 2017 + + We notice you suspended '{0}'. Reset keymappings to continue to navigate and refactor. '{0}'을(를) 일시 중단하신 것으로 보입니다. 계속 탐색하고 리팩터링하려면 키 매핑을 다시 설정하세요. diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf index ec5ff961662dac40557be7c053e0e1077217f8d5..c692791a624442da8b93889a2aca0a9c08b14854 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf @@ -82,11 +82,6 @@ Obliczanie elementów zależnych... - - Classifications - Klasyfikacje - - Code analysis completed for '{0}'. Ukończono analizę kodu dla elementu „{0}”. @@ -117,11 +112,26 @@ Bieżący dokument + + Editor Color Scheme + Editor Color Scheme + + + + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + + Element is not valid. Element jest nieprawidłowy. + + Enhanced + Enhanced + + Entire solution Całe rozwiązanie @@ -527,6 +537,11 @@ Pokaż listę uzupełniania + + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + + Target Namespace: Docelowa przestrzeń nazw: @@ -557,11 +572,6 @@ Użyj trybu zgodności pliku editorconfig (wymaga ponownego uruchomienia) - - Use enhanced colors for C# and Basic - Użyj kolorów rozszerzonych dla języków C# i Basic - - Use expression body for lambdas Użyj treści wyrażenia dla wyrażeń lambda @@ -587,6 +597,11 @@ Wartość zwracana przez wywołanie jest niejawnie ignorowana + + Visual Studio 2017 + Visual Studio 2017 + + We notice you suspended '{0}'. Reset keymappings to continue to navigate and refactor. Zauważyliśmy, że element „{0}” został przez Ciebie wstrzymany. Zresetuj mapowanie klawiszy, aby kontynuować nawigowanie i refaktoryzację. diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf index 2ffb11eeb48f9f5fa5d7f1030bbbfad13820fe49..aaa1289f43fe574c3bea0f4e456be67b93c265a0 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf @@ -82,11 +82,6 @@ Calculando dependentes... - - Classifications - Classificações - - Code analysis completed for '{0}'. Análise de código concluída para '{0}'. @@ -117,11 +112,26 @@ Documento atual + + Editor Color Scheme + Editor Color Scheme + + + + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + + Element is not valid. O elemento é inválido. + + Enhanced + Enhanced + + Entire solution Solução Inteira @@ -527,6 +537,11 @@ Mostrar a lista de conclusão + + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + + Target Namespace: Namespace de Destino: @@ -557,11 +572,6 @@ Usar o modo de compatibilidade .editorconfig (exige reinicialização) - - Use enhanced colors for C# and Basic - Usar cores aprimoradas para C# e Basic - - Use expression body for lambdas Usar o corpo da expressão para lambdas @@ -587,6 +597,11 @@ O valor retornado por chamada é implicitamente ignorado + + Visual Studio 2017 + Visual Studio 2017 + + We notice you suspended '{0}'. Reset keymappings to continue to navigate and refactor. Notamos que você suspendeu '{0}'. Redefina os mapeamentos de teclas para continuar a navegar e refatorar. diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf index 18f37c27ec837579daebb97d6948bccdc319b302..bb5c30203f0a3f50f2ad6403535cab183f5de5fc 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf @@ -82,11 +82,6 @@ Вычисление зависимостей… - - Classifications - Классификации - - Code analysis completed for '{0}'. Анализ кода для "{0}" выполнен. @@ -117,11 +112,26 @@ Текущий документ + + Editor Color Scheme + Editor Color Scheme + + + + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + + Element is not valid. Элемент недопустим. + + Enhanced + Enhanced + + Entire solution Все решение @@ -527,6 +537,11 @@ Показать список завершения + + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + + Target Namespace: Целевое пространство имен: @@ -557,11 +572,6 @@ Использовать режим совместимости с .editorconfig (требуется перезапуск) - - Use enhanced colors for C# and Basic - Использовать расширенные цвета для C# и Basic - - Use expression body for lambdas Использовать тело выражения для лямбда-выражений @@ -587,6 +597,11 @@ Значение, возвращаемое вызовом, неявным образом игнорируется. + + Visual Studio 2017 + Visual Studio 2017 + + We notice you suspended '{0}'. Reset keymappings to continue to navigate and refactor. Вы приостановили действие "{0}". Сбросьте назначения клавиш, чтобы продолжить работу и рефакторинг. diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf index 2cf109ed91663932785a67912fa33a5d8a418dc8..e43ca9a655b8f94cc8a510d42572ff0caeacf37b 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf @@ -82,11 +82,6 @@ Bağımlılar hesaplanıyor... - - Classifications - Sınıflandırmalar - - Code analysis completed for '{0}'. '{0}' için kod analizi tamamlandı. @@ -117,11 +112,26 @@ Geçerli belge + + Editor Color Scheme + Editor Color Scheme + + + + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + + Element is not valid. Öğe geçerli değil. + + Enhanced + Enhanced + + Entire solution Tüm çözüm @@ -527,6 +537,11 @@ Tamamlama listesini göster + + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + + Target Namespace: Hedef Ad Alanı: @@ -557,11 +572,6 @@ .editorconfig uyumluluk modunu kullanın (yeniden başlatma gerektirir) - - Use enhanced colors for C# and Basic - C# ve Basic için gelişmiş renkleri kullan - - Use expression body for lambdas Lambdalar için ifade gövdesi kullan @@ -587,6 +597,11 @@ Çağrı ile döndürülen değer örtük olarak yok sayıldı + + Visual Studio 2017 + Visual Studio 2017 + + We notice you suspended '{0}'. Reset keymappings to continue to navigate and refactor. '{0}' öğesini askıya aldığınızı fark ettik. Gezintiye ve yeniden düzenlemeye devam etmek için tuş eşlemelerini sıfırlayın. diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf index 46e14885d4ae03d2bc811ec8f77c58ba8762761b..fec7e890ff02c15986aa7d51750631f7184377dd 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf @@ -82,11 +82,6 @@ 正在计算依赖项... - - Classifications - 分类 - - Code analysis completed for '{0}'. “{0}”的代码分析已完成。 @@ -117,11 +112,26 @@ 当前文档 + + Editor Color Scheme + Editor Color Scheme + + + + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + + Element is not valid. 元素无效。 + + Enhanced + Enhanced + + Entire solution 整个解决方案 @@ -527,6 +537,11 @@ 显示完成列表 + + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + + Target Namespace: 目标命名空间: @@ -557,11 +572,6 @@ 使用 .editorconfig 兼容模式(需要重启) - - Use enhanced colors for C# and Basic - 对 C# 和 Basic 使用增强色 - - Use expression body for lambdas 使用 lambdas 的表达式主体 @@ -587,6 +597,11 @@ 已隐式忽略调用所返回的值 + + Visual Studio 2017 + Visual Studio 2017 + + We notice you suspended '{0}'. Reset keymappings to continue to navigate and refactor. 我们注意到你挂起了“{0}”。请重置项映射以继续导航和重构。 diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf index e8056775c8d79a0ae7e60d86412121a4c4b9abb8..1fe8e114231ae338baa271d70d531544555b0d8e 100644 --- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf +++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf @@ -82,11 +82,6 @@ 正在計算相依項... - - Classifications - 分類 - - Code analysis completed for '{0}'. '{0}' 的程式碼分析已完成。 @@ -117,11 +112,26 @@ 目前的文件 + + Editor Color Scheme + Editor Color Scheme + + + + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + Editor color scheme options are only available when using a color theme bundled with Visual Studio. The color theme can be configured from the Environment > General options page. + + Element is not valid. 元素無效。 + + Enhanced + Enhanced + + Entire solution 整個解決方案 @@ -527,6 +537,11 @@ 顯示自動完成清單 + + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + Some color scheme colors are being overridden by changes made in the Environment > Fonts and Colors options page. Choose `Use Defaults` in the Fonts and Colors page to revert all customizations. + + Target Namespace: 目標命名空間: @@ -557,11 +572,6 @@ 使用 .editorconfig 相容性模式 (需要重新啟動) - - Use enhanced colors for C# and Basic - 使用 C# 和 Basic 的進階色彩 - - Use expression body for lambdas 使用 lambda 的運算式主體 @@ -587,6 +597,11 @@ 明確地忽略引動過程傳回的值 + + Visual Studio 2017 + Visual Studio 2017 + + We notice you suspended '{0}'. Reset keymappings to continue to navigate and refactor. 我們發現您暫止了 '{0}'。重設按鍵對應以繼續巡覽和重構。 diff --git a/src/VisualStudio/Core/Impl/Options/AbstractOptionPageControl.cs b/src/VisualStudio/Core/Impl/Options/AbstractOptionPageControl.cs index 495f658044c69518ed8fe5da1b5d8c90efdc92b2..bcadf4301ff5b779cdc0e768d1a1e653f507000e 100644 --- a/src/VisualStudio/Core/Impl/Options/AbstractOptionPageControl.cs +++ b/src/VisualStudio/Core/Impl/Options/AbstractOptionPageControl.cs @@ -54,6 +54,11 @@ private void InitializeStyles() radioButtonStyle.Setters.Add(new Setter(RadioButton.MarginProperty, new Thickness() { Bottom = 7 })); radioButtonStyle.Setters.Add(new Setter(RadioButton.ForegroundProperty, new DynamicResourceExtension(SystemColors.WindowTextBrushKey))); Resources.Add(typeof(RadioButton), radioButtonStyle); + + var comboBoxStyle = new System.Windows.Style(typeof(ComboBox)); + comboBoxStyle.Setters.Add(new Setter(ComboBox.MarginProperty, new Thickness() { Bottom = 7 })); + comboBoxStyle.Setters.Add(new Setter(ComboBox.ForegroundProperty, new DynamicResourceExtension(SystemColors.WindowTextBrushKey))); + Resources.Add(typeof(ComboBox), comboBoxStyle); } protected void BindToOption(CheckBox checkbox, Option optionKey) @@ -69,38 +74,37 @@ protected void BindToOption(CheckBox checkbox, Option optionKey) _bindingExpressions.Add(bindingExpression); } - protected void BindToOption(CheckBox checkbox, Option optionKey) + protected void BindToOption(CheckBox checkbox, PerLanguageOption optionKey, string languageName) { var binding = new Binding() { - Source = new OptionBinding(OptionStore, optionKey), + Source = new PerLanguageOptionBinding(OptionStore, optionKey, languageName), Path = new PropertyPath("Value"), - UpdateSourceTrigger = UpdateSourceTrigger.Default, - Converter = new CheckBoxCheckedToIntConverter(), + UpdateSourceTrigger = UpdateSourceTrigger.Default }; var bindingExpression = checkbox.SetBinding(CheckBox.IsCheckedProperty, binding); _bindingExpressions.Add(bindingExpression); } - protected void BindToOption(CheckBox checkbox, PerLanguageOption optionKey, string languageName) + protected void BindToOption(TextBox textBox, Option optionKey) { var binding = new Binding() { - Source = new PerLanguageOptionBinding(OptionStore, optionKey, languageName), + Source = new OptionBinding(OptionStore, optionKey), Path = new PropertyPath("Value"), UpdateSourceTrigger = UpdateSourceTrigger.Default }; - var bindingExpression = checkbox.SetBinding(CheckBox.IsCheckedProperty, binding); + var bindingExpression = textBox.SetBinding(TextBox.TextProperty, binding); _bindingExpressions.Add(bindingExpression); } - protected void BindToOption(TextBox textBox, Option optionKey) + protected void BindToOption(TextBox textBox, PerLanguageOption optionKey, string languageName) { var binding = new Binding() { - Source = new OptionBinding(OptionStore, optionKey), + Source = new PerLanguageOptionBinding(OptionStore, optionKey, languageName), Path = new PropertyPath("Value"), UpdateSourceTrigger = UpdateSourceTrigger.Default }; @@ -109,16 +113,31 @@ protected void BindToOption(TextBox textBox, Option optionKey) _bindingExpressions.Add(bindingExpression); } - protected void BindToOption(TextBox textBox, PerLanguageOption optionKey, string languageName) + protected void BindToOption(ComboBox comboBox, Option optionKey) { var binding = new Binding() { - Source = new PerLanguageOptionBinding(OptionStore, optionKey, languageName), + Source = new OptionBinding(OptionStore, optionKey), Path = new PropertyPath("Value"), - UpdateSourceTrigger = UpdateSourceTrigger.Default + Converter = new ComboBoxItemTagToIndexConverter(), + ConverterParameter = comboBox }; - var bindingExpression = textBox.SetBinding(TextBox.TextProperty, binding); + var bindingExpression = comboBox.SetBinding(ComboBox.SelectedIndexProperty, binding); + _bindingExpressions.Add(bindingExpression); + } + + protected void BindToOption(ComboBox comboBox, PerLanguageOption optionKey, string languageName) + { + var binding = new Binding() + { + Source = new PerLanguageOptionBinding(OptionStore, optionKey, languageName), + Path = new PropertyPath("Value"), + Converter = new ComboBoxItemTagToIndexConverter(), + ConverterParameter = comboBox + }; + + var bindingExpression = comboBox.SetBinding(ComboBox.SelectedIndexProperty, binding); _bindingExpressions.Add(bindingExpression); } @@ -169,18 +188,35 @@ public class RadioButtonCheckedConverter : IValueConverter } } - public class CheckBoxCheckedToIntConverter : IValueConverter + public class ComboBoxItemTagToIndexConverter : IValueConverter { - public object Convert(object value, Type targetType, object parameter, - System.Globalization.CultureInfo culture) + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { - return !value.Equals(-1); + var comboBox = (ComboBox)parameter; + + for (var index = 0; index < comboBox.Items.Count; index++) + { + var item = (ComboBoxItem)comboBox.Items[index]; + if (item.Tag.Equals(value)) + { + return index; + } + } + + return -1; } - public object ConvertBack(object value, Type targetType, object parameter, - System.Globalization.CultureInfo culture) + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { - return value.Equals(true) ? 1 : -1; + var index = (int)value; + if (index == -1) + { + return null; + } + + var comboBox = (ComboBox)parameter; + var item = (ComboBoxItem)comboBox.Items[index]; + return item.Tag; } } } diff --git a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPage.vb b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPage.vb index 52d1bc4a74e5315322150ffed1b36d36be100135..fa3c5a1cbfa2c565eb83078cfa828609738d82b0 100644 --- a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPage.vb +++ b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPage.vb @@ -3,6 +3,7 @@ ' See the LICENSE file in the project root for more information. Imports System.Runtime.InteropServices +Imports Microsoft.VisualStudio.ComponentModelHost Imports Microsoft.VisualStudio.LanguageServices.Implementation.Options Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options @@ -11,7 +12,9 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options Inherits AbstractOptionPage Protected Overrides Function CreateOptionPage(serviceProvider As IServiceProvider, optionStore As OptionStore) As AbstractOptionPageControl - Return New AdvancedOptionPageControl(optionStore) + Dim componentModel = DirectCast(Me.Site.GetService(GetType(SComponentModel)), IComponentModel) + + Return New AdvancedOptionPageControl(optionStore, componentModel) End Function End Class End Namespace diff --git a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml index 5b41226f7113bebb833de9f47798fc2733cba544..f151a81eb9276c2246be1bc4af4b585030ce74c0 100644 --- a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml +++ b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml @@ -130,11 +130,21 @@ - + - + + + + + + diff --git a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml.vb b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml.vb index 9a8594f65f5a9f5afe9d8640f21cb17b418b7dbd..31c8fccab92e2573a517a0d116d2f045cf347dcf 100644 --- a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml.vb +++ b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageControl.xaml.vb @@ -2,8 +2,11 @@ ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. +Imports System.Windows +Imports System.Windows.Media Imports Microsoft.CodeAnalysis Imports Microsoft.CodeAnalysis.Editing +Imports Microsoft.CodeAnalysis.Editor.Options Imports Microsoft.CodeAnalysis.Editor.Shared.Options Imports Microsoft.CodeAnalysis.EmbeddedLanguages.RegularExpressions Imports Microsoft.CodeAnalysis.ExtractMethod @@ -14,14 +17,20 @@ Imports Microsoft.CodeAnalysis.SolutionCrawler Imports Microsoft.CodeAnalysis.Structure Imports Microsoft.CodeAnalysis.SymbolSearch Imports Microsoft.CodeAnalysis.ValidateFormatString +Imports Microsoft.VisualStudio.ComponentModelHost +Imports Microsoft.VisualStudio.LanguageServices.ColorSchemes Imports Microsoft.VisualStudio.LanguageServices.Implementation Imports Microsoft.VisualStudio.LanguageServices.Implementation.Options Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options Friend Class AdvancedOptionPageControl - Public Sub New(optionStore As OptionStore) + Private _colorSchemeApplier As ColorSchemeApplier + + Public Sub New(optionStore As OptionStore, componentModel As IComponentModel) MyBase.New(optionStore) + _colorSchemeApplier = componentModel.GetService(Of ColorSchemeApplier)() + InitializeComponent() BindToOption(Background_analysis_scope_active_file, SolutionCrawlerOptions.BackgroundAnalysisScopeOption, BackgroundAnalysisScope.ActiveFile, LanguageNames.VisualBasic) @@ -71,7 +80,20 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options BindToOption(Highlight_related_components_under_cursor, RegularExpressionsOptions.HighlightRelatedRegexComponentsUnderCursor, LanguageNames.VisualBasic) BindToOption(Show_completion_list, RegularExpressionsOptions.ProvideRegexCompletions, LanguageNames.VisualBasic) - BindToOption(Use_enhanced_colors, FeatureOnOffOptions.UseEnhancedColors) + BindToOption(Editor_color_scheme, ColorSchemeOptions.ColorScheme) + End Sub + + ' Since this dialog is constructed once for the lifetime of the application and VS Theme can be changed after the application has started, + ' we need to update the visibility of our combobox and warnings based on the current VS theme before being rendered. + Friend Overrides Sub OnLoad() + Dim isSupportedTheme = _colorSchemeApplier.IsSupportedTheme() + Dim isCustomized = _colorSchemeApplier.IsThemeCustomized() + + Editor_color_scheme.Visibility = If(isSupportedTheme, Visibility.Visible, Visibility.Collapsed) + Customized_Theme_Warning.Visibility = If(isSupportedTheme AndAlso isCustomized, Visibility.Visible, Visibility.Collapsed) + Custom_VS_Theme_Warning.Visibility = If(isSupportedTheme, Visibility.Collapsed, Visibility.Visible) + + MyBase.OnLoad() End Sub End Class End Namespace diff --git a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageStrings.vb b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageStrings.vb index 2050e05e200b40c4c801f58a7b96516768386ed3..4675408f85483a8cc3b7a749f148529f8c6c203e 100644 --- a/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageStrings.vb +++ b/src/VisualStudio/VisualBasic/Impl/Options/AdvancedOptionPageStrings.vb @@ -2,6 +2,8 @@ ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. +Imports Microsoft.CodeAnalysis.Editor.ColorSchemes + Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options Friend Module AdvancedOptionPageStrings @@ -231,10 +233,25 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options Public ReadOnly Property Option_Show_completion_list As String = ServicesVSResources.Show_completion_list - Public ReadOnly Property Option_Classifications As String = - ServicesVSResources.Classifications + Public ReadOnly Property Option_Editor_Color_Scheme As String = + ServicesVSResources.Editor_Color_Scheme + + Public ReadOnly Property Editor_color_scheme_options_are_only_available_when_using_a_color_theme_bundled_with_Visual_Studio_The_color_theme_can_be_configured_from_the_Environment_General_options_page As String = + ServicesVSResources.Editor_color_scheme_options_are_only_available_when_using_a_color_theme_bundled_with_Visual_Studio_The_color_theme_can_be_configured_from_the_Environment_General_options_page + + Public ReadOnly Property Some_color_scheme_colors_are_being_overridden_by_changes_made_in_the_Environment_Fonts_and_Colors_options_page_Choose_Use_Defaults_in_the_Fonts_and_Colors_page_to_revert_all_customizations As String = + ServicesVSResources.Some_color_scheme_colors_are_being_overridden_by_changes_made_in_the_Environment_Fonts_and_Colors_options_page_Choose_Use_Defaults_in_the_Fonts_and_Colors_page_to_revert_all_customizations + + Public ReadOnly Property Option_Color_Scheme_Enhanced As String = + ServicesVSResources.Enhanced + + Public ReadOnly Property Option_Color_Scheme_VisualStudio2017 As String = + ServicesVSResources.Visual_Studio_2017 + + Public ReadOnly Property Color_Scheme_Enhanced_Tag As SchemeName = + SchemeName.Enhanced - Public ReadOnly Property Option_Use_enhanced_colors_for_C_and_Basic As String = - ServicesVSResources.Use_enhanced_colors_for_C_and_Basic + Public ReadOnly Property Color_Scheme_VisualStudio2017_Tag As SchemeName = + SchemeName.VisualStudio2017 End Module End Namespace diff --git a/src/VisualStudio/VisualBasic/Impl/VSPackage.resx b/src/VisualStudio/VisualBasic/Impl/VSPackage.resx index 2d726389eb7d008e688c9bd0349ed3e34a4d8753..9203ac366cd090241129472b94fbae0672b6f393 100644 --- a/src/VisualStudio/VisualBasic/Impl/VSPackage.resx +++ b/src/VisualStudio/VisualBasic/Impl/VSPackage.resx @@ -128,7 +128,7 @@ Visual Basic Editor - Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression; + Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression;Use enhanced colors;Editor Color Scheme; Advanced options page keywords diff --git a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.cs.xlf b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.cs.xlf index ab36c24ea133821cb4a297a36fb7f2073f3eb0c6..77508fa16d349ebcc767b25dd1b98f75b0878fbf 100644 --- a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.cs.xlf +++ b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.cs.xlf @@ -18,8 +18,8 @@ - Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression; - Automatické vložení koncových konstruktorů;Změnit nastavení přehledného výpisu;Změnit režim sbalení;Automatické vkládání členů Interface a MustOverride;Zobrazit nebo skrýt oddělovače řádků procedur;Zapnout nebo vypnout návrhy oprav;Zapnout nebo vypnout zvýrazňování odkazů a klíčových slov;Regex;Obarvit regulární výrazy;Zvýrazňovat související komponenty pod kurzorem;Nahlásit neplatné regulární výrazy;reg. výr.;regulární výraz; + Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression;Use enhanced colors;Editor Color Scheme; + Automatické vložení koncových konstruktorů;Změnit nastavení přehledného výpisu;Změnit režim sbalení;Automatické vkládání členů Interface a MustOverride;Zobrazit nebo skrýt oddělovače řádků procedur;Zapnout nebo vypnout návrhy oprav;Zapnout nebo vypnout zvýrazňování odkazů a klíčových slov;Regex;Obarvit regulární výrazy;Zvýrazňovat související komponenty pod kurzorem;Nahlásit neplatné regulární výrazy;reg. výr.;regulární výraz; Advanced options page keywords diff --git a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.de.xlf b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.de.xlf index 74c82fb8b4d3090bfec03c33282083be89400977..f25454ec93a4fe8a42a421a256a00eea722e9e0d 100644 --- a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.de.xlf +++ b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.de.xlf @@ -18,8 +18,8 @@ - Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression; - Endkonstrukte automatisch einfügen;Einstellungen für automatische Strukturierung und Einrückung ändern;Gliederungsmodus ändern;Schnittstellen- und MustOverride-Member automatisch einfügen;Zeilentrennzeichen zwischen Prozeduren anzeigen oder ausblenden;Vorschläge für Fehlerkorrektur ein- oder ausschalten;Markierung von Verweisen und Schlüsselwörtern ein- oder ausschalten;Regex;Reguläre Ausdrücke farbig markieren;Verwandte Komponenten unter Cursor hervorheben;Ungültige reguläre Ausdrücke melden;regex;regulärer Ausdruck; + Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression;Use enhanced colors;Editor Color Scheme; + Endkonstrukte automatisch einfügen;Einstellungen für automatische Strukturierung und Einrückung ändern;Gliederungsmodus ändern;Schnittstellen- und MustOverride-Member automatisch einfügen;Zeilentrennzeichen zwischen Prozeduren anzeigen oder ausblenden;Vorschläge für Fehlerkorrektur ein- oder ausschalten;Markierung von Verweisen und Schlüsselwörtern ein- oder ausschalten;Regex;Reguläre Ausdrücke farbig markieren;Verwandte Komponenten unter Cursor hervorheben;Ungültige reguläre Ausdrücke melden;regex;regulärer Ausdruck; Advanced options page keywords diff --git a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.es.xlf b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.es.xlf index 0372bd874728823923b4145b5dc85c63fe259f20..d0d56cf4bfce3fa9135bf4b3b05365e0a7cbdfdc 100644 --- a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.es.xlf +++ b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.es.xlf @@ -18,8 +18,8 @@ - Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression; - Inserción automática de construcciones End;Cambiar configuración de la lista descriptiva;Cambiar modo de esquematización;Inserción automática de miembros Interface y MustOverride;Mostrar u ocultar separadores de línea de procedimientos;Activar o desactivar sugerencias de corrección de errores;Activar o desactivar resaltado de referencias y palabras clave;Regex;Colorear expresiones regulares;Resaltar componentes relacionados bajo el cursor;Informar sobre expresiones regulares no válidas;regex;expresión regular; + Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression;Use enhanced colors;Editor Color Scheme; + Inserción automática de construcciones End;Cambiar configuración de la lista descriptiva;Cambiar modo de esquematización;Inserción automática de miembros Interface y MustOverride;Mostrar u ocultar separadores de línea de procedimientos;Activar o desactivar sugerencias de corrección de errores;Activar o desactivar resaltado de referencias y palabras clave;Regex;Colorear expresiones regulares;Resaltar componentes relacionados bajo el cursor;Informar sobre expresiones regulares no válidas;regex;expresión regular; Advanced options page keywords diff --git a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.fr.xlf b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.fr.xlf index ebb45c22340e6f55b3179bc4e1d10e4bad50a89a..3cdbbd596a8b0493c6e0c62ffc941a8d5fd12b7e 100644 --- a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.fr.xlf +++ b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.fr.xlf @@ -18,8 +18,8 @@ - Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression; - Insertion automatique des constructions de fin;Changer les paramètres de listing en mode Pretty;Changer le mode Plan;Insertion automatique des membres Interface et MustOverride;Afficher ou masquer les séparateurs de ligne de procédure;Activer ou désactiver les suggestions de correction d'erreurs;Activer ou désactiver la mise en surbrillance des références et des mots clés;Regex;Mettre en couleurs les expressions régulières;Mettre en surbrillance les composants connexes sous le curseur;Signaler les expressions régulières non valides;regex;expression régulière; + Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression;Use enhanced colors;Editor Color Scheme; + Insertion automatique des constructions de fin;Changer les paramètres de listing en mode Pretty;Changer le mode Plan;Insertion automatique des membres Interface et MustOverride;Afficher ou masquer les séparateurs de ligne de procédure;Activer ou désactiver les suggestions de correction d'erreurs;Activer ou désactiver la mise en surbrillance des références et des mots clés;Regex;Mettre en couleurs les expressions régulières;Mettre en surbrillance les composants connexes sous le curseur;Signaler les expressions régulières non valides;regex;expression régulière; Advanced options page keywords diff --git a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.it.xlf b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.it.xlf index ebeb428686f9064344d1481d395bb9a477ee1c6b..60884dd8bacb624f46978502e5cc06960b9223f4 100644 --- a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.it.xlf +++ b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.it.xlf @@ -18,8 +18,8 @@ - Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression; - Inserimento automatico di costrutti End;Modifica impostazioni di riformattazione;Modifica modalità struttura;Inserimento automatico di membri Interface e MustOverride;Mostra o nascondi separatori di riga routine;Attiva o disattiva i suggerimenti per la correzione degli errori;Attiva o disattiva evidenziazione di riferimenti e parole chiave;Regex;Colora espressioni regolari;Evidenzia componenti correlati sotto il cursore;Segnala espressioni regolari non valide;regex;espressione regolare; + Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression;Use enhanced colors;Editor Color Scheme; + Inserimento automatico di costrutti End;Modifica impostazioni di riformattazione;Modifica modalità struttura;Inserimento automatico di membri Interface e MustOverride;Mostra o nascondi separatori di riga routine;Attiva o disattiva i suggerimenti per la correzione degli errori;Attiva o disattiva evidenziazione di riferimenti e parole chiave;Regex;Colora espressioni regolari;Evidenzia componenti correlati sotto il cursore;Segnala espressioni regolari non valide;regex;espressione regolare; Advanced options page keywords diff --git a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.ja.xlf b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.ja.xlf index 7cb4e2788460faf21cbaabbb24f60aa65b75579c..5b96fe3f29511bec7f56f521a31bfe1553678c33 100644 --- a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.ja.xlf +++ b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.ja.xlf @@ -18,8 +18,8 @@ - Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression; - コンストラクトの終端の自動挿入;再フォーマット設定の変更;アウトライン モードの変更;Interface と MustOverride メンバーの自動挿入;プロシージャ行の区切り記号の表示/非表示;エラー修正候補のオン/オフの切り替え;参照とキーワードの強調表示のオン/オフの切り替え;Regex;正規表現の色付け;カーソルの下の関連コンポーネントのハイライト;無効な正規表現の報告;Regex;正規表現; + Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression;Use enhanced colors;Editor Color Scheme; + コンストラクトの終端の自動挿入;再フォーマット設定の変更;アウトライン モードの変更;Interface と MustOverride メンバーの自動挿入;プロシージャ行の区切り記号の表示/非表示;エラー修正候補のオン/オフの切り替え;参照とキーワードの強調表示のオン/オフの切り替え;Regex;正規表現の色付け;カーソルの下の関連コンポーネントのハイライト;無効な正規表現の報告;Regex;正規表現; Advanced options page keywords diff --git a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.ko.xlf b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.ko.xlf index 240a46272dca0ba57cef3d2a9d291600161a1432..41644bf4c42152727784ac15cd40752358d684f4 100644 --- a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.ko.xlf +++ b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.ko.xlf @@ -18,8 +18,8 @@ - Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression; - 맺음 구문 자동 삽입;자동 서식 지정 설정 변경;개요 모드 변경;인터페이스 및 MustOverride 멤버 자동 삽입;프로시저 줄 구분선 표시/숨기기;오류 수정 제안 설정/해제;참조 및 키워드의 강조 표시 설정/해제;Regex;정규식 색 입히기;커서 아래에 관련 구성 요소 강조 표시;잘못된 정규식 보고;regex;정규식 + Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression;Use enhanced colors;Editor Color Scheme; + 맺음 구문 자동 삽입;자동 서식 지정 설정 변경;개요 모드 변경;인터페이스 및 MustOverride 멤버 자동 삽입;프로시저 줄 구분선 표시/숨기기;오류 수정 제안 설정/해제;참조 및 키워드의 강조 표시 설정/해제;Regex;정규식 색 입히기;커서 아래에 관련 구성 요소 강조 표시;잘못된 정규식 보고;regex;정규식 Advanced options page keywords diff --git a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.pl.xlf b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.pl.xlf index fd3ec4e7f0954fdc609e30bfda860be197a07e22..8b3dfe46af0fa2551f0ea5a0c8b778693f3577eb 100644 --- a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.pl.xlf +++ b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.pl.xlf @@ -18,8 +18,8 @@ - Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression; - Automatyczne wstawianie konstrukcji końcowych;Zmień ustawienia formatowania kodu;Zmień tryb konspektu;Automatyczne wstawianie składowych Interface i MustOverride;Pokaż lub ukryj separatory wierszy procedury;Włącz lub wyłącz sugestie dotyczące poprawy błędów;Włącz lub wyłącz wyróżnianie odwołań i słów kluczowych;Wyrażenie regularne;Koloruj wyrażenia regularne;Wyróżnij pokrewne składniki wskazane przez kursor;Zgłaszaj nieprawidłowe wyrażenia regularne;wyrażenie regularne;wyrażenie regularne + Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression;Use enhanced colors;Editor Color Scheme; + Automatyczne wstawianie konstrukcji końcowych;Zmień ustawienia formatowania kodu;Zmień tryb konspektu;Automatyczne wstawianie składowych Interface i MustOverride;Pokaż lub ukryj separatory wierszy procedury;Włącz lub wyłącz sugestie dotyczące poprawy błędów;Włącz lub wyłącz wyróżnianie odwołań i słów kluczowych;Wyrażenie regularne;Koloruj wyrażenia regularne;Wyróżnij pokrewne składniki wskazane przez kursor;Zgłaszaj nieprawidłowe wyrażenia regularne;wyrażenie regularne;wyrażenie regularne Advanced options page keywords diff --git a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.pt-BR.xlf b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.pt-BR.xlf index 0a9960c4dea170a5894eb66124d223a7f5d5c38d..39fb62f22c14ba91472519be786ab086418bf53e 100644 --- a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.pt-BR.xlf +++ b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.pt-BR.xlf @@ -18,8 +18,8 @@ - Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression; - Inserção automática de constructos finais;Alterar as configurações de reformatação automática;Alterar o modo de estrutura de tópicos;Inserção automática de membros de Interface e de MustOverride;Mostrar ou ocultar separadores de linha de procedimento;Habilitar ou desabilitar sugestões para correção de erros;Habilitar ou desabilitar o realce de referências e palavras-chave;Regex;Colorir expressões regulares;Realçar os componentes relacionados sob o cursor;Relatar expressões regulares inválidas;regex;expressão regular; + Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression;Use enhanced colors;Editor Color Scheme; + Inserção automática de constructos finais;Alterar as configurações de reformatação automática;Alterar o modo de estrutura de tópicos;Inserção automática de membros de Interface e de MustOverride;Mostrar ou ocultar separadores de linha de procedimento;Habilitar ou desabilitar sugestões para correção de erros;Habilitar ou desabilitar o realce de referências e palavras-chave;Regex;Colorir expressões regulares;Realçar os componentes relacionados sob o cursor;Relatar expressões regulares inválidas;regex;expressão regular; Advanced options page keywords diff --git a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.ru.xlf b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.ru.xlf index 7844fbfc7256ab8b815ec261df87536f8ee8e4e5..da520d37872d5d549475e59c07097b6b49e53ff5 100644 --- a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.ru.xlf +++ b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.ru.xlf @@ -18,8 +18,8 @@ - Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression; - Автоматическая вставка конечных конструкций;Изменение параметров автоматического форматирования;Изменение режима структуры;Автоматическая вставка интерфейса и членов MustOverride;Отображение или скрытие разделителей строк для процедуры;Включение или выключение предложения об исправлении ошибок;Включение или выключение выделения ссылок и ключевых слов;Регулярные выражения;Выделение регулярных выражений цветом;Выделение связанных компонентов под курсором;Выделение недопустимых регулярных выражений;регулярное выражение;регулярное выражение; + Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression;Use enhanced colors;Editor Color Scheme; + Автоматическая вставка конечных конструкций;Изменение параметров автоматического форматирования;Изменение режима структуры;Автоматическая вставка интерфейса и членов MustOverride;Отображение или скрытие разделителей строк для процедуры;Включение или выключение предложения об исправлении ошибок;Включение или выключение выделения ссылок и ключевых слов;Регулярные выражения;Выделение регулярных выражений цветом;Выделение связанных компонентов под курсором;Выделение недопустимых регулярных выражений;регулярное выражение;регулярное выражение; Advanced options page keywords diff --git a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.tr.xlf b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.tr.xlf index ae4038a251ed767094589ce06504fcc32b7ea620..6838bf1059ecbf8c387ba661ab83e428c2ff978e 100644 --- a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.tr.xlf +++ b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.tr.xlf @@ -18,8 +18,8 @@ - Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression; - Bitirme yapılarının otomatik olarak eklenmesi;Düzgün listeleme ayarlarını değiştir;Ana hat modunu değiştir;Arabirim ve MustOverride üyelerinin otomatik olarak eklenmesi;Yordam satır ayıraçlarını göster veya gizle;Hata düzeltme önerilerini aç veya kapat;Başvuruları ve anahtar sözcükleri vurgulamayı aç veya kapat;Normal ifade;Normal ifadeleri renklendir;İmlecin altında ilgili bileşenleri vurgula;Geçersiz normal ifadeleri bildir;normal ifade;normal ifade; + Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression;Use enhanced colors;Editor Color Scheme; + Bitirme yapılarının otomatik olarak eklenmesi;Düzgün listeleme ayarlarını değiştir;Ana hat modunu değiştir;Arabirim ve MustOverride üyelerinin otomatik olarak eklenmesi;Yordam satır ayıraçlarını göster veya gizle;Hata düzeltme önerilerini aç veya kapat;Başvuruları ve anahtar sözcükleri vurgulamayı aç veya kapat;Normal ifade;Normal ifadeleri renklendir;İmlecin altında ilgili bileşenleri vurgula;Geçersiz normal ifadeleri bildir;normal ifade;normal ifade; Advanced options page keywords diff --git a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.zh-Hans.xlf b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.zh-Hans.xlf index 542c88dfdad39d41113e69642d64d7b496dcc2ef..6a70d01d4ab594490da97239a55b7c8591ebe0a0 100644 --- a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.zh-Hans.xlf +++ b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.zh-Hans.xlf @@ -18,8 +18,8 @@ - Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression; - 自动插入 End 构造;更改整齐排列设置;更改大纲模式;自动插入 Interface 和 MustOverride 成员;显示或隐藏过程行分隔符;打开或关闭错误纠正建议;打开或关闭引用和关键字的突出显示;正则表达式;对正则表达式着色;突出显示光标下的相关部分;报告无效正则表达式;regex;正则表达式; + Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression;Use enhanced colors;Editor Color Scheme; + 自动插入 End 构造;更改整齐排列设置;更改大纲模式;自动插入 Interface 和 MustOverride 成员;显示或隐藏过程行分隔符;打开或关闭错误纠正建议;打开或关闭引用和关键字的突出显示;正则表达式;对正则表达式着色;突出显示光标下的相关部分;报告无效正则表达式;regex;正则表达式; Advanced options page keywords diff --git a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.zh-Hant.xlf b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.zh-Hant.xlf index 462a5a431f3701956f92faef7d4ac9cdbf10053a..445e719d2329b2e874a0a14bc69ea616c0703b00 100644 --- a/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.zh-Hant.xlf +++ b/src/VisualStudio/VisualBasic/Impl/xlf/VSPackage.zh-Hant.xlf @@ -18,8 +18,8 @@ - Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression; - 自動插入 End 建構;變更美化排列設定;變更大綱模式;自動插入 Interface 和 MustOverride 成員;顯示或隱藏程序行分隔符號;開啟或關閉錯誤修正建議;開啟或關閉參考及關鍵字的醒目提示;Regex;以顏色標示規則運算式;為資料指標下的相關元件加上醒目提示;回報無效的規則運算式;regex;規則運算式; + Automatic insertion of end constructs;Change pretty listing settings;Change outlining mode;Automatic insertion of Interface and MustOverride members;Show or hide procedure line separators;Turn error correction suggestions on or off;Turn highlighting of references and keywords on or off;Regex;Colorize regular expressions;Highlight related components under cursor;Report invalid regular expressions;regex;regular expression;Use enhanced colors;Editor Color Scheme; + 自動插入 End 建構;變更美化排列設定;變更大綱模式;自動插入 Interface 和 MustOverride 成員;顯示或隱藏程序行分隔符號;開啟或關閉錯誤修正建議;開啟或關閉參考及關鍵字的醒目提示;Regex;以顏色標示規則運算式;為資料指標下的相關元件加上醒目提示;回報無效的規則運算式;regex;規則運算式; Advanced options page keywords