提交 d211833a 编写于 作者: J Jason Malinowski

Remove flighting and have a checkbox opt out of new .editorconfig support

At this point, the flighting controls we have aren't really useful
anymore: we want this on for everybody unless the opt out, and that
opt-out would be specific to certain users that are running into issues
with the new system to keep them unblocked. I'm keeping this a per-
machine setting (that doesn't roam) because it's really repo or VS
version specific.
上级 90d53c9c
......@@ -22,6 +22,8 @@
<CheckBox x:Name="Enable_use_nullable_reference_types"
IsThreeState="True"
Content="{x:Static local:AdvancedOptionPageStrings.Option_use_nullable_reference_analysis_IDE_features}" />
<CheckBox x:Name="Use_editorconfig_compatibility_mode"
Content="{x:Static local:AdvancedOptionPageStrings.Option_use_editorconfig_compatibility_mode}" />
</StackPanel>
</GroupBox>
<GroupBox x:Uid="UsingDirectivesGroupBox"
......
......@@ -8,6 +8,7 @@
using Microsoft.CodeAnalysis.ExtractMethod;
using Microsoft.CodeAnalysis.Fading;
using Microsoft.CodeAnalysis.ImplementType;
using Microsoft.CodeAnalysis.Options.EditorConfig;
using Microsoft.CodeAnalysis.Structure;
using Microsoft.CodeAnalysis.SymbolSearch;
using Microsoft.CodeAnalysis.ValidateFormatString;
......@@ -24,6 +25,7 @@ public AdvancedOptionPageControl(OptionStore optionStore) : base(optionStore)
BindToFullSolutionAnalysisOption(Enable_full_solution_analysis, LanguageNames.CSharp);
BindToOption(Enable_navigation_to_decompiled_sources, FeatureOnOffOptions.NavigateToDecompiledSources);
BindTristateToOption(Enable_use_nullable_reference_types, FeatureOnOffOptions.UseNullableReferenceTypeAnalysis);
BindToOption(Use_editorconfig_compatibility_mode, EditorConfigDocumentOptionsProviderFactory.UseLegacyEditorConfigSupport);
BindToOption(PlaceSystemNamespaceFirst, GenerationOptions.PlaceSystemNamespaceFirst, LanguageNames.CSharp);
BindToOption(SeparateImportGroups, GenerationOptions.SeparateImportDirectiveGroups, LanguageNames.CSharp);
......
......@@ -21,6 +21,9 @@ public static string Option_Enable_navigation_to_decompiled_sources
public static string Option_use_nullable_reference_analysis_IDE_features
=> ServicesVSResources.Enable_nullable_reference_analysis_IDE_features;
public static string Option_use_editorconfig_compatibility_mode
=> ServicesVSResources.Use_editorconfig_compatibility_mode;
public static string Option_RenameTrackingPreview => CSharpVSResources.Show_preview_for_rename_tracking;
public static string Option_Split_string_literals_on_enter => CSharpVSResources.Split_string_literals_on_enter;
......
......@@ -3381,6 +3381,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Use .editorconfig compatibility mode (requires restart).
/// </summary>
internal static string Use_editorconfig_compatibility_mode {
get {
return ResourceManager.GetString("Use_editorconfig_compatibility_mode", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Use enhanced colors for C# and Basic.
/// </summary>
......
......@@ -1340,4 +1340,7 @@ I agree to all of the foregoing:</value>
<value>Type Parameter</value>
<comment>This string can be found under "Tools | Options | Text Editor | Basic | Code Style | Naming | Manage Specifications | + | Symbol kinds". All of the "NamingSpecification_VisualBasic_*" strings represent language constructs, and some of them are also actual keywords (NOT this one). Refers to the Visual Basic language concept of a "type parameter".</comment>
</data>
<data name="Use_editorconfig_compatibility_mode" xml:space="preserve">
<value>Use .editorconfig compatibility mode (requires restart)</value>
</data>
</root>
\ No newline at end of file
......@@ -457,6 +457,11 @@
<target state="translated">Nepoužitá hodnota se explicitně přiřadí k zahození.</target>
<note />
</trans-unit>
<trans-unit id="Use_editorconfig_compatibility_mode">
<source>Use .editorconfig compatibility mode (requires restart)</source>
<target state="new">Use .editorconfig compatibility mode (requires restart)</target>
<note />
</trans-unit>
<trans-unit id="Use_enhanced_colors_for_C_and_Basic">
<source>Use enhanced colors for C# and Basic</source>
<target state="translated">Pro C# a Basic používat rozšířené barvy</target>
......
......@@ -457,6 +457,11 @@
<target state="translated">Der nicht verwendete Wert wird explizit verworfen.</target>
<note />
</trans-unit>
<trans-unit id="Use_editorconfig_compatibility_mode">
<source>Use .editorconfig compatibility mode (requires restart)</source>
<target state="new">Use .editorconfig compatibility mode (requires restart)</target>
<note />
</trans-unit>
<trans-unit id="Use_enhanced_colors_for_C_and_Basic">
<source>Use enhanced colors for C# and Basic</source>
<target state="translated">Erweiterte Farben für C# und Basic verwenden</target>
......
......@@ -457,6 +457,11 @@
<target state="translated">El valor sin usar se asigna explícitamente para descartar</target>
<note />
</trans-unit>
<trans-unit id="Use_editorconfig_compatibility_mode">
<source>Use .editorconfig compatibility mode (requires restart)</source>
<target state="new">Use .editorconfig compatibility mode (requires restart)</target>
<note />
</trans-unit>
<trans-unit id="Use_enhanced_colors_for_C_and_Basic">
<source>Use enhanced colors for C# and Basic</source>
<target state="translated">Usar los colores mejorados para C# y Basic</target>
......
......@@ -457,6 +457,11 @@
<target state="translated">La valeur inutilisée est explicitement affectée à une variable discard</target>
<note />
</trans-unit>
<trans-unit id="Use_editorconfig_compatibility_mode">
<source>Use .editorconfig compatibility mode (requires restart)</source>
<target state="new">Use .editorconfig compatibility mode (requires restart)</target>
<note />
</trans-unit>
<trans-unit id="Use_enhanced_colors_for_C_and_Basic">
<source>Use enhanced colors for C# and Basic</source>
<target state="translated">Utiliser les couleurs améliorées en C# et Basic</target>
......
......@@ -457,6 +457,11 @@
<target state="translated">Il valore inutilizzato viene assegnato in modo esplicito a discard</target>
<note />
</trans-unit>
<trans-unit id="Use_editorconfig_compatibility_mode">
<source>Use .editorconfig compatibility mode (requires restart)</source>
<target state="new">Use .editorconfig compatibility mode (requires restart)</target>
<note />
</trans-unit>
<trans-unit id="Use_enhanced_colors_for_C_and_Basic">
<source>Use enhanced colors for C# and Basic</source>
<target state="translated">Usa colori migliorati per C# e Basic</target>
......
......@@ -457,6 +457,11 @@
<target state="translated">未使用の値が discard に明示的に割り当てられます</target>
<note />
</trans-unit>
<trans-unit id="Use_editorconfig_compatibility_mode">
<source>Use .editorconfig compatibility mode (requires restart)</source>
<target state="new">Use .editorconfig compatibility mode (requires restart)</target>
<note />
</trans-unit>
<trans-unit id="Use_enhanced_colors_for_C_and_Basic">
<source>Use enhanced colors for C# and Basic</source>
<target state="translated">C# および Basic で拡張された色を使用します</target>
......
......@@ -457,6 +457,11 @@
<target state="translated">사용되지 않는 값이 무시 항목에 명시적으로 할당됩니다.</target>
<note />
</trans-unit>
<trans-unit id="Use_editorconfig_compatibility_mode">
<source>Use .editorconfig compatibility mode (requires restart)</source>
<target state="new">Use .editorconfig compatibility mode (requires restart)</target>
<note />
</trans-unit>
<trans-unit id="Use_enhanced_colors_for_C_and_Basic">
<source>Use enhanced colors for C# and Basic</source>
<target state="translated">C# 및 Basic에 향상된 색 사용</target>
......
......@@ -457,6 +457,11 @@
<target state="translated">Nieużywana wartość jest jawnie przypisywana do odrzutu</target>
<note />
</trans-unit>
<trans-unit id="Use_editorconfig_compatibility_mode">
<source>Use .editorconfig compatibility mode (requires restart)</source>
<target state="new">Use .editorconfig compatibility mode (requires restart)</target>
<note />
</trans-unit>
<trans-unit id="Use_enhanced_colors_for_C_and_Basic">
<source>Use enhanced colors for C# and Basic</source>
<target state="translated">Użyj ulepszonych kolorów dla języków C# i Basic</target>
......
......@@ -457,6 +457,11 @@
<target state="translated">O valor não utilizado é explicitamente atribuído ao descarte</target>
<note />
</trans-unit>
<trans-unit id="Use_editorconfig_compatibility_mode">
<source>Use .editorconfig compatibility mode (requires restart)</source>
<target state="new">Use .editorconfig compatibility mode (requires restart)</target>
<note />
</trans-unit>
<trans-unit id="Use_enhanced_colors_for_C_and_Basic">
<source>Use enhanced colors for C# and Basic</source>
<target state="translated">Usar cores aprimoradas para C# e Basic</target>
......
......@@ -457,6 +457,11 @@
<target state="translated">Неиспользуемое значение явным образом задано пустой переменной.</target>
<note />
</trans-unit>
<trans-unit id="Use_editorconfig_compatibility_mode">
<source>Use .editorconfig compatibility mode (requires restart)</source>
<target state="new">Use .editorconfig compatibility mode (requires restart)</target>
<note />
</trans-unit>
<trans-unit id="Use_enhanced_colors_for_C_and_Basic">
<source>Use enhanced colors for C# and Basic</source>
<target state="translated">Использовать расширенные цвета для C# и Basic</target>
......
......@@ -457,6 +457,11 @@
<target state="translated">Kullanılmayan değer açıkça atılmak üzere atandı</target>
<note />
</trans-unit>
<trans-unit id="Use_editorconfig_compatibility_mode">
<source>Use .editorconfig compatibility mode (requires restart)</source>
<target state="new">Use .editorconfig compatibility mode (requires restart)</target>
<note />
</trans-unit>
<trans-unit id="Use_enhanced_colors_for_C_and_Basic">
<source>Use enhanced colors for C# and Basic</source>
<target state="translated">C# ve Basic için gelişmiş renkleri kullan</target>
......
......@@ -457,6 +457,11 @@
<target state="translated">未使用的值会显式分配以弃用</target>
<note />
</trans-unit>
<trans-unit id="Use_editorconfig_compatibility_mode">
<source>Use .editorconfig compatibility mode (requires restart)</source>
<target state="new">Use .editorconfig compatibility mode (requires restart)</target>
<note />
</trans-unit>
<trans-unit id="Use_enhanced_colors_for_C_and_Basic">
<source>Use enhanced colors for C# and Basic</source>
<target state="translated">对 C# 和 Basic 使用增强色</target>
......
......@@ -457,6 +457,11 @@
<target state="translated">未使用的值已明確指派至捨棄</target>
<note />
</trans-unit>
<trans-unit id="Use_editorconfig_compatibility_mode">
<source>Use .editorconfig compatibility mode (requires restart)</source>
<target state="new">Use .editorconfig compatibility mode (requires restart)</target>
<note />
</trans-unit>
<trans-unit id="Use_enhanced_colors_for_C_and_Basic">
<source>Use enhanced colors for C# and Basic</source>
<target state="translated">使用 C# 和 Basic 的增強色彩</target>
......
......@@ -18,6 +18,8 @@
<StackPanel>
<CheckBox x:Name="Enable_full_solution_analysis"
Content="{x:Static local:AdvancedOptionPageStrings.Option_Enable_full_solution_analysis}" />
<CheckBox x:Name="Use_editorconfig_compatibility_mode"
Content="{x:Static local:AdvancedOptionPageStrings.Option_use_editorconfig_compatibility_mode}" />
</StackPanel>
</GroupBox>
<GroupBox x:Uid="ImportDirectivesGroupBox"
......
......@@ -7,6 +7,7 @@ Imports Microsoft.CodeAnalysis.EmbeddedLanguages.RegularExpressions
Imports Microsoft.CodeAnalysis.ExtractMethod
Imports Microsoft.CodeAnalysis.Fading
Imports Microsoft.CodeAnalysis.ImplementType
Imports Microsoft.CodeAnalysis.Options.EditorConfig
Imports Microsoft.CodeAnalysis.Structure
Imports Microsoft.CodeAnalysis.SymbolSearch
Imports Microsoft.CodeAnalysis.ValidateFormatString
......@@ -21,6 +22,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options
InitializeComponent()
BindToFullSolutionAnalysisOption(Enable_full_solution_analysis, LanguageNames.VisualBasic)
BindToOption(Use_editorconfig_compatibility_mode, EditorConfigDocumentOptionsProviderFactory.UseLegacyEditorConfigSupport)
BindToOption(PlaceSystemNamespaceFirst, GenerationOptions.PlaceSystemNamespaceFirst, LanguageNames.VisualBasic)
BindToOption(SeparateImportGroups, GenerationOptions.SeparateImportDirectiveGroups, LanguageNames.VisualBasic)
......
......@@ -21,6 +21,8 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.Options
Public ReadOnly Property Option_Enable_full_solution_analysis As String =
ServicesVSResources.Enable_full_solution_analysis
Public ReadOnly Property Option_use_editorconfig_compatibility_mode As String = ServicesVSResources.Use_editorconfig_compatibility_mode
Public ReadOnly Property Option_DisplayLineSeparators As String
Get
Return BasicVSResources.Show_procedure_line_separators
......
......@@ -30,7 +30,6 @@ internal static class WellKnownExperimentNames
public const string PartialLoadMode = "Roslyn.PartialLoadMode";
public const string TypeImportCompletion = "Roslyn.TypeImportCompletion";
public const string TargetTypedCompletionFilter = "Roslyn.TargetTypedCompletionFilter";
public const string NativeEditorConfigSupport = "Roslyn.NativeEditorConfigSupport";
public const string RoslynInlineRenameFile = "Roslyn.FileRename";
}
}
......@@ -7,7 +7,6 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.ErrorLogger;
using Microsoft.CodeAnalysis.Experiments;
namespace Microsoft.CodeAnalysis.Options.EditorConfig
{
......@@ -30,10 +29,15 @@ public IDocumentOptionsProvider TryCreate(Workspace workspace)
return new EditorConfigDocumentOptionsProvider(workspace.Services.GetService<IErrorLoggerService>());
}
private const string LocalRegistryPath = @"Roslyn\Internal\OnOff\Features\";
public static readonly Option<bool> UseLegacyEditorConfigSupport =
new Option<bool>(nameof(EditorConfigDocumentOptionsProviderFactory), nameof(UseLegacyEditorConfigSupport), defaultValue: false,
storageLocations: new LocalUserProfileStorageLocation(LocalRegistryPath + "UseLegacySupport"));
public static bool ShouldUseNativeEditorConfigSupport(Workspace workspace)
{
var experimentationService = workspace.Services.GetService<IExperimentationService>();
return experimentationService.IsExperimentEnabled(WellKnownExperimentNames.NativeEditorConfigSupport);
return !workspace.Options.GetOption(UseLegacyEditorConfigSupport);
}
private class EditorConfigDocumentOptionsProvider : IDocumentOptionsProvider
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册