未验证 提交 8441344a 编写于 作者: J Joey Robichaud 提交者: GitHub

Removed CodeCleanup experiment settings and experience. (#30605)

- Reverted FormatCommandHandler.FormatDocument
- Removed option search configuration for code cleanup
上级 6bdc7b1e
// 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.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.CodeCleanup;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.Experiments;
using Microsoft.CodeAnalysis.Extensions;
using Microsoft.CodeAnalysis.Internal.Log;
using Microsoft.CodeAnalysis.Options;
using Microsoft.CodeAnalysis.Shared.Extensions;
using Microsoft.CodeAnalysis.Shared.Utilities;
using Microsoft.CodeAnalysis.Text;
using Microsoft.VisualStudio.Commanding;
using Microsoft.VisualStudio.Text.Editor.Commanding.Commands;
using Roslyn.Utilities;
using VSCommanding = Microsoft.VisualStudio.Commanding;
namespace Microsoft.CodeAnalysis.Editor.Implementation.Formatting
{
internal partial class FormatCommandHandler : ForegroundThreadAffinitizedObject
internal partial class FormatCommandHandler
{
private const string s_experimentName = "CleanupOn";
public VSCommanding.CommandState GetCommandState(FormatDocumentCommandArgs args)
{
return GetCommandState(args.SubjectBuffer);
}
private void ShowGoldBarForCodeCleanupConfiguration(Document document, bool performAdditionalCodeCleanupDuringFormatting)
{
AssertIsForeground();
Logger.Log(FunctionId.CodeCleanupInfobar_BarDisplayed, KeyValueLogMessage.NoProperty);
var workspace = document.Project.Solution.Workspace;
// if info bar was shown already in same VS session, no need to show it again
if (workspace.Options.GetOption(CodeCleanupOptions.CodeCleanupInfoBarShown, document.Project.Language))
{
return;
}
// set as infobar shown so that we never show it again in same VS session. we might show it again
// in other VS sessions if it is not explicitly configured yet
workspace.Options = workspace.Options.WithChangedOption(
CodeCleanupOptions.CodeCleanupInfoBarShown, document.Project.Language, value: true);
var optionPageService = document.GetLanguageService<IOptionPageService>();
var infoBarService = document.Project.Solution.Workspace.Services.GetRequiredService<IInfoBarService>();
// wording for the Code Cleanup infobar will be different depending on if the feature is enabled
var infoBarMessage = performAdditionalCodeCleanupDuringFormatting
? EditorFeaturesResources.Format_document_performed_additional_cleanup
: EditorFeaturesResources.Code_cleanup_is_not_configured;
var configButtonText = performAdditionalCodeCleanupDuringFormatting
? EditorFeaturesResources.Change_configuration
: EditorFeaturesResources.Configure_it_now;
infoBarService.ShowInfoBarInGlobalView(
infoBarMessage,
new InfoBarUI(configButtonText,
kind: InfoBarUI.UIKind.Button,
() =>
{
Logger.Log(FunctionId.CodeCleanupInfobar_ConfigureNow, KeyValueLogMessage.NoProperty);
optionPageService.ShowFormattingOptionPage();
}),
new InfoBarUI(EditorFeaturesResources.Do_not_show_this_message_again,
kind: InfoBarUI.UIKind.Button,
() =>
{
Logger.Log(FunctionId.CodeCleanupInfobar_NeverShowCodeCleanupInfoBarAgain, KeyValueLogMessage.NoProperty);
workspace.Options = workspace.Options.WithChangedOption(
CodeCleanupOptions.NeverShowCodeCleanupInfoBarAgain, document.Project.Language, value: true);
}));
}
public bool ExecuteCommand(FormatDocumentCommandArgs args, CommandExecutionContext context)
{
if (!CanExecuteCommand(args.SubjectBuffer))
......@@ -91,109 +28,18 @@ public bool ExecuteCommand(FormatDocumentCommandArgs args, CommandExecutionConte
return false;
}
context.OperationContext.TakeOwnership();
_waitIndicator.Wait(
EditorFeaturesResources.Formatting_document,
EditorFeaturesResources.Formatting_document,
allowCancel: true,
showProgress: true,
c =>
{
var docOptions = document.GetOptionsAsync(c.CancellationToken).WaitAndGetResult(c.CancellationToken);
using (Logger.LogBlock(FunctionId.FormatDocument, CodeCleanupLogMessage.Create(docOptions), c.CancellationToken))
using (var transaction = new CaretPreservingEditTransaction(
EditorFeaturesResources.Formatting, args.TextView, _undoHistoryRegistry, _editorOperationsFactoryService))
{
var codeCleanupService = document.GetLanguageService<ICodeCleanupService>();
if (codeCleanupService == null)
{
Format(args.TextView, document, selectionOpt: null, c.CancellationToken);
}
else
{
CodeCleanupOrFormat(args, document, codeCleanupService, c.ProgressTracker, c.CancellationToken);
}
transaction.Complete();
}
});
return true;
}
private void CodeCleanupOrFormat(
FormatDocumentCommandArgs args, Document document, ICodeCleanupService codeCleanupService,
IProgressTracker progressTracker, CancellationToken cancellationToken)
{
var workspace = document.Project.Solution.Workspace;
var isFeatureTurnedOnThroughABTest = TurnOnCodeCleanupForGroupBIfInABTest(document, workspace);
var performAdditionalCodeCleanupDuringFormatting = workspace.Options.GetOption(CodeCleanupOptions.PerformAdditionalCodeCleanupDuringFormatting, document.Project.Language);
// if feature is turned on through AB test, we need to show the Gold bar even if they set NeverShowCodeCleanupInfoBarAgain == true before
if (isFeatureTurnedOnThroughABTest ||
!workspace.Options.GetOption(CodeCleanupOptions.NeverShowCodeCleanupInfoBarAgain, document.Project.Language))
{
// Show different gold bar text depends on PerformAdditionalCodeCleanupDuringFormatting value
ShowGoldBarForCodeCleanupConfiguration(document, performAdditionalCodeCleanupDuringFormatting);
}
if (performAdditionalCodeCleanupDuringFormatting)
{
// Start with a single progress item, which is the one to actually apply
// the changes.
progressTracker.AddItems(1);
// Code cleanup
var oldDoc = document;
var codeCleanupChanges = GetCodeCleanupAndFormatChangesAsync(
document, codeCleanupService, progressTracker, cancellationToken).WaitAndGetResult(cancellationToken);
if (codeCleanupChanges != null && codeCleanupChanges.Length > 0)
{
progressTracker.Description = EditorFeaturesResources.Applying_changes;
ApplyChanges(oldDoc, codeCleanupChanges.ToList(), selectionOpt: null, cancellationToken);
}
progressTracker.ItemCompleted();
}
else
var formattingService = document.GetLanguageService<IEditorFormattingService>();
if (formattingService == null || !formattingService.SupportsFormatDocument)
{
Format(args.TextView, document, selectionOpt: null, cancellationToken);
return false;
}
}
private static bool TurnOnCodeCleanupForGroupBIfInABTest(Document document, Workspace workspace)
{
// If the feature is OFF and the feature options have not yet been Enabled to their assigned flight, do so now
// Do not reset the options if we already set it for them once, so options won't get reset if user manually disabled it already after it is enabled by the flight
if (!workspace.Options.GetOption(CodeCleanupOptions.PerformAdditionalCodeCleanupDuringFormatting, document.Project.Language)
&& !workspace.Options.GetOption(CodeCleanupABTestOptions.SettingIsAlreadyUpdatedByExperiment))
using (context.OperationContext.AddScope(allowCancellation: true, EditorFeaturesResources.Formatting_document))
{
var experimentationService = document.Project.Solution.Workspace.Services.GetService<IExperimentationService>();
if (experimentationService != null
&& experimentationService.IsExperimentEnabled(s_experimentName))
{
workspace.Options = workspace.Options.WithChangedOption(CodeCleanupABTestOptions.SettingIsAlreadyUpdatedByExperiment, true)
.WithChangedOption(CodeCleanupOptions.PerformAdditionalCodeCleanupDuringFormatting, document.Project.Language, true);
return true;
}
Format(args.TextView, document, null, context.OperationContext.UserCancellationToken);
}
return false;
}
private async Task<ImmutableArray<TextChange>> GetCodeCleanupAndFormatChangesAsync(
Document document, ICodeCleanupService codeCleanupService,
IProgressTracker progressTracker, CancellationToken cancellationToken)
{
var newDoc = await codeCleanupService.CleanupAsync(
document, progressTracker, cancellationToken).ConfigureAwait(false);
var changes = await newDoc.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false);
return changes.ToImmutableArrayOrEmpty();
return true;
}
}
}
......@@ -40,22 +40,17 @@ internal partial class FormatCommandHandler :
{
private readonly ITextUndoHistoryRegistry _undoHistoryRegistry;
private readonly IEditorOperationsFactoryService _editorOperationsFactoryService;
private readonly IWaitIndicator _waitIndicator;
public string DisplayName => EditorFeaturesResources.Automatic_Formatting;
[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
public FormatCommandHandler(
IThreadingContext threadingContext,
ITextUndoHistoryRegistry undoHistoryRegistry,
IEditorOperationsFactoryService editorOperationsFactoryService,
IWaitIndicator waitIndicator)
: base(threadingContext)
IEditorOperationsFactoryService editorOperationsFactoryService)
{
_undoHistoryRegistry = undoHistoryRegistry;
_editorOperationsFactoryService = editorOperationsFactoryService;
_waitIndicator = waitIndicator;
}
private void Format(ITextView textView, Document document, TextSpan? selectionOpt, CancellationToken cancellationToken)
......@@ -78,8 +73,6 @@ private void Format(ITextView textView, Document document, TextSpan? selectionOp
private void ApplyChanges(Document document, IList<TextChange> changes, TextSpan? selectionOpt, CancellationToken cancellationToken)
{
AssertIsForeground();
if (selectionOpt.HasValue)
{
var ruleFactory = document.Project.Solution.Workspace.Services.GetService<IHostDependentFormattingRuleFactoryService>();
......
using Microsoft.CodeAnalysis.Options;
namespace Microsoft.CodeAnalysis.CodeCleanup
{
internal static class CodeCleanupABTestOptions
{
private const string LocalRegistryPath = @"Roslyn\Internal\CodeCleanup\";
public static readonly Option<bool> SettingIsAlreadyUpdatedByExperiment = new Option<bool>(nameof(CodeCleanupABTestOptions), nameof(SettingIsAlreadyUpdatedByExperiment),
defaultValue: false, storageLocations: new LocalUserProfileStorageLocation(LocalRegistryPath + nameof(SettingIsAlreadyUpdatedByExperiment)));
}
}
......@@ -21,28 +21,6 @@
<CheckBox x:Name="FormatOnPasteCheckBox" x:Uid="FormatOnPasteCheckBox" />
</StackPanel>
</GroupBox>
<GroupBox x:Name="FormatDocumentSettingsGroupBox" x:Uid="FormatDocumentSettingsGroupBox" >
<StackPanel>
<CheckBox x:Name="AllCSharpFormattingRulesCheckBox" x:Uid="AllCSharpFormattingRulesCheckBox" IsEnabled="False" IsChecked="True"/>
<CheckBox x:Name="PerformAdditionalCodeCleanupDuringFormattingCheckBox" x:Uid="PerformAdditionalCodeCleanupDuringFormattingCheckBox" />
<StackPanel Margin="15, 0, 0, 0" IsEnabled="{Binding ElementName=PerformAdditionalCodeCleanupDuringFormattingCheckBox, Path=IsChecked}">
<CheckBox x:Name="RemoveUnusedUsingsCheckBox" x:Uid="RemoveUnusedUsingsCheckBox" />
<CheckBox x:Name="SortUsingsCheckBox" x:Uid="SortUsingsCheckBox" />
<CheckBox x:Name="AddRemoveBracesForSingleLineControlStatementsCheckBox" x:Uid="AddRemoveBracesForSingleLineControlStatementsCheckBox" />
<CheckBox x:Name="AddAccessibilityModifiersCheckBox" x:Uid="AddAccessibilityModifiersCheckBox" />
<CheckBox x:Name="SortAccessibilityModifiersCheckBox" x:Uid="SortAccessibilityModifiersCheckBox" />
<CheckBox x:Name="ApplyExpressionBlockBodyPreferencesCheckBox" x:Uid="ApplyExpressionBlockBodyPreferencesCheckBox" />
<CheckBox x:Name="ApplyImplicitExplicitTypePreferencesCheckBox" x:Uid="ApplyImplicitExplicitTypePreferencesCheckBox" />
<CheckBox x:Name="ApplyInlineOutVariablePreferencesCheckBox" x:Uid="ApplyInlineOutVariablePreferencesCheckBox" />
<CheckBox x:Name="ApplyLanguageFrameworkTypePreferencesCheckBox" x:Uid="ApplyLanguageFrameworkTypePreferencesCheckBox" />
<CheckBox x:Name="ApplyObjectCollectionInitializationPreferencesCheckBox" x:Uid="ApplyObjectCollectionInitializationPreferencesCheckBox" />
<CheckBox x:Name="ApplyThisQualificationPreferencesCheckBox" x:Uid="ApplyThisQualificationPreferencesCheckBox" />
<CheckBox x:Name="MakePrivateFieldReadonlyWhenPossibleCheckBox" x:Uid="MakePrivateFieldReadonlyWhenPossibleCheckBox" />
<CheckBox x:Name="RemoveUnnecessaryCastsCheckBox" x:Uid="RemoveUnnecessaryCastsCheckBox" />
<CheckBox x:Name="RemoveUnusedVariablesCheckBox" x:Uid="RemoveUnusedVariablesCheckBox" />
</StackPanel>
</StackPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
</options:AbstractOptionPageControl>
......@@ -29,55 +29,6 @@ public FormattingOptionPageControl(IServiceProvider serviceProvider) : base(serv
BindToOption(FormatOnSemicolonCheckBox, FeatureOnOffOptions.AutoFormattingOnSemicolon, LanguageNames.CSharp);
BindToOption(FormatOnReturnCheckBox, FeatureOnOffOptions.AutoFormattingOnReturn, LanguageNames.CSharp);
BindToOption(FormatOnPasteCheckBox, FeatureOnOffOptions.FormatOnPaste, LanguageNames.CSharp);
FormatDocumentSettingsGroupBox.Header = CSharpVSResources.Format_document_settings;
AllCSharpFormattingRulesCheckBox.Content = CSharpVSResources.Apply_all_csharp_formatting_rules_indentation_wrapping_spacing;
PerformAdditionalCodeCleanupDuringFormattingCheckBox.Content = CSharpVSResources.Perform_additional_code_cleanup_during_formatting;
RemoveUnusedUsingsCheckBox.Content = CSharpVSResources.Remove_unnecessary_usings;
SortUsingsCheckBox.Content = CSharpVSResources.Sort_usings;
AddRemoveBracesForSingleLineControlStatementsCheckBox.Content = CSharpFeaturesResources.Add_remove_braces_for_single_line_control_statements;
AddAccessibilityModifiersCheckBox.Content = CSharpFeaturesResources.Add_accessibility_modifiers;
SortAccessibilityModifiersCheckBox.Content = CSharpFeaturesResources.Sort_accessibility_modifiers;
ApplyExpressionBlockBodyPreferencesCheckBox.Content = CSharpFeaturesResources.Apply_expression_block_body_preferences;
ApplyImplicitExplicitTypePreferencesCheckBox.Content = CSharpFeaturesResources.Apply_implicit_explicit_type_preferences;
ApplyInlineOutVariablePreferencesCheckBox.Content = CSharpFeaturesResources.Apply_inline_out_variable_preferences;
ApplyLanguageFrameworkTypePreferencesCheckBox.Content = CSharpFeaturesResources.Apply_language_framework_type_preferences;
ApplyObjectCollectionInitializationPreferencesCheckBox.Content = CSharpFeaturesResources.Apply_object_collection_initialization_preferences;
ApplyThisQualificationPreferencesCheckBox.Content = CSharpFeaturesResources.Apply_this_qualification_preferences;
MakePrivateFieldReadonlyWhenPossibleCheckBox.Content = CSharpFeaturesResources.Make_private_field_readonly_when_possible;
RemoveUnnecessaryCastsCheckBox.Content = CSharpFeaturesResources.Remove_unnecessary_casts;
RemoveUnusedVariablesCheckBox.Content = CSharpFeaturesResources.Remove_unused_variables;
BindToOption(PerformAdditionalCodeCleanupDuringFormattingCheckBox, CodeCleanupOptions.PerformAdditionalCodeCleanupDuringFormatting, LanguageNames.CSharp);
BindToOption(RemoveUnusedUsingsCheckBox, CodeCleanupOptions.RemoveUnusedImports, LanguageNames.CSharp);
BindToOption(SortUsingsCheckBox, CodeCleanupOptions.SortImports, LanguageNames.CSharp);
BindToOption(AddRemoveBracesForSingleLineControlStatementsCheckBox, CodeCleanupOptions.AddRemoveBracesForSingleLineControlStatements, LanguageNames.CSharp);
BindToOption(AddAccessibilityModifiersCheckBox, CodeCleanupOptions.AddAccessibilityModifiers, LanguageNames.CSharp);
BindToOption(SortAccessibilityModifiersCheckBox, CodeCleanupOptions.SortAccessibilityModifiers, LanguageNames.CSharp);
BindToOption(ApplyExpressionBlockBodyPreferencesCheckBox, CodeCleanupOptions.ApplyExpressionBlockBodyPreferences, LanguageNames.CSharp);
BindToOption(ApplyImplicitExplicitTypePreferencesCheckBox, CodeCleanupOptions.ApplyImplicitExplicitTypePreferences, LanguageNames.CSharp);
BindToOption(ApplyInlineOutVariablePreferencesCheckBox, CodeCleanupOptions.ApplyInlineOutVariablePreferences, LanguageNames.CSharp);
BindToOption(ApplyLanguageFrameworkTypePreferencesCheckBox, CodeCleanupOptions.ApplyLanguageFrameworkTypePreferences, LanguageNames.CSharp);
BindToOption(ApplyObjectCollectionInitializationPreferencesCheckBox, CodeCleanupOptions.ApplyObjectCollectionInitializationPreferences, LanguageNames.CSharp);
BindToOption(ApplyThisQualificationPreferencesCheckBox, CodeCleanupOptions.ApplyThisQualificationPreferences, LanguageNames.CSharp);
BindToOption(MakePrivateFieldReadonlyWhenPossibleCheckBox, CodeCleanupOptions.MakePrivateFieldReadonlyWhenPossible, LanguageNames.CSharp);
BindToOption(RemoveUnnecessaryCastsCheckBox, CodeCleanupOptions.RemoveUnnecessaryCasts, LanguageNames.CSharp);
BindToOption(RemoveUnusedVariablesCheckBox, CodeCleanupOptions.RemoveUnusedVariables, LanguageNames.CSharp);
}
internal override void SaveSettings()
{
base.SaveSettings();
// once formatting option is explicitly set (regardless codeclean is on or off),
// we never show code cleanup info bar again
var oldOptions = OptionService.GetOptions();
var newOptions = oldOptions.WithChangedOption(
CodeCleanupOptions.NeverShowCodeCleanupInfoBarAgain, LanguageNames.CSharp, value: true);
OptionService.SetOptions(newOptions);
OptionLogger.Log(oldOptions, newOptions);
}
}
}
......@@ -192,24 +192,7 @@ prefer auto properties;</value>
Automatically format statement on semicolon ;
Automatically format block on end brace;
Automatically format on return;
Automatically format on paste;
Format Document Settings;
Apply all C# formatting rules indentation, wrapping, spacing;
Perform additional code cleanup during formatting;
Remove unnecessary usings;
Sort usings;
Add remove braces for single-line control statements;
Add accessibility modifiers;
Sort accessibility modifiers;
Apply expression block/body preferences;
Apply implicit/explicit type preferences;
Apply inline out variables preferences;
Apply language/framework type preferences;
Apply object/collection initialization preferences;
Apply this qualification preferences;
Make private fields readonly when possible;
Remove unnecessary casts;
Remove unused variables;</value>
Automatically format on paste;</value>
<comment>C# Formatting &gt; General options page keywords</comment>
</data>
<data name="308" xml:space="preserve">
......
......@@ -84,24 +84,7 @@ prefer auto properties;</source>
Automatically format statement on semicolon ;
Automatically format block on end brace;
Automatically format on return;
Automatically format on paste;
Format Document Settings;
Apply all C# formatting rules indentation, wrapping, spacing;
Perform additional code cleanup during formatting;
Remove unnecessary usings;
Sort usings;
Add remove braces for single-line control statements;
Add accessibility modifiers;
Sort accessibility modifiers;
Apply expression block/body preferences;
Apply implicit/explicit type preferences;
Apply inline out variables preferences;
Apply language/framework type preferences;
Apply object/collection initialization preferences;
Apply this qualification preferences;
Make private fields readonly when possible;
Remove unnecessary casts;
Remove unused variables;</source>
Automatically format on paste;</source>
<target state="needs-review-translation">Automaticky formátovat příkaz při středníku;Automaticky formátovat blok při složené závorce;Automaticky formátovat při vložení;vyčištění kódu;</target>
<note>C# Formatting &gt; General options page keywords</note>
</trans-unit>
......
......@@ -84,24 +84,7 @@ prefer auto properties;</source>
Automatically format statement on semicolon ;
Automatically format block on end brace;
Automatically format on return;
Automatically format on paste;
Format Document Settings;
Apply all C# formatting rules indentation, wrapping, spacing;
Perform additional code cleanup during formatting;
Remove unnecessary usings;
Sort usings;
Add remove braces for single-line control statements;
Add accessibility modifiers;
Sort accessibility modifiers;
Apply expression block/body preferences;
Apply implicit/explicit type preferences;
Apply inline out variables preferences;
Apply language/framework type preferences;
Apply object/collection initialization preferences;
Apply this qualification preferences;
Make private fields readonly when possible;
Remove unnecessary casts;
Remove unused variables;</source>
Automatically format on paste;</source>
<target state="needs-review-translation">Anweisung bei Semikolon automatisch formatieren;Block bei geschweifter Klammer automatisch formatieren;Beim Einfügen automatisch formatieren;Codebereinigung;</target>
<note>C# Formatting &gt; General options page keywords</note>
</trans-unit>
......
......@@ -84,24 +84,7 @@ prefer auto properties;</source>
Automatically format statement on semicolon ;
Automatically format block on end brace;
Automatically format on return;
Automatically format on paste;
Format Document Settings;
Apply all C# formatting rules indentation, wrapping, spacing;
Perform additional code cleanup during formatting;
Remove unnecessary usings;
Sort usings;
Add remove braces for single-line control statements;
Add accessibility modifiers;
Sort accessibility modifiers;
Apply expression block/body preferences;
Apply implicit/explicit type preferences;
Apply inline out variables preferences;
Apply language/framework type preferences;
Apply object/collection initialization preferences;
Apply this qualification preferences;
Make private fields readonly when possible;
Remove unnecessary casts;
Remove unused variables;</source>
Automatically format on paste;</source>
<target state="needs-review-translation">Formato automático en instrucciones al escribir punto y coma;Formato automático en bloques al escribir llave;Formato automático al pegar;Limpieza de código;</target>
<note>C# Formatting &gt; General options page keywords</note>
</trans-unit>
......
......@@ -84,24 +84,7 @@ prefer auto properties;</source>
Automatically format statement on semicolon ;
Automatically format block on end brace;
Automatically format on return;
Automatically format on paste;
Format Document Settings;
Apply all C# formatting rules indentation, wrapping, spacing;
Perform additional code cleanup during formatting;
Remove unnecessary usings;
Sort usings;
Add remove braces for single-line control statements;
Add accessibility modifiers;
Sort accessibility modifiers;
Apply expression block/body preferences;
Apply implicit/explicit type preferences;
Apply inline out variables preferences;
Apply language/framework type preferences;
Apply object/collection initialization preferences;
Apply this qualification preferences;
Make private fields readonly when possible;
Remove unnecessary casts;
Remove unused variables;</source>
Automatically format on paste;</source>
<target state="needs-review-translation">Mettre en forme automatiquement l'instruction lors de l'entrée d’un point-virgule;Mettre en forme automatiquement le bloc lors de l'entrée d’une accolade;Mettre en forme automatiquement lors du collage;Nettoyage du code;</target>
<note>C# Formatting &gt; General options page keywords</note>
</trans-unit>
......
......@@ -84,24 +84,7 @@ prefer auto properties;</source>
Automatically format statement on semicolon ;
Automatically format block on end brace;
Automatically format on return;
Automatically format on paste;
Format Document Settings;
Apply all C# formatting rules indentation, wrapping, spacing;
Perform additional code cleanup during formatting;
Remove unnecessary usings;
Sort usings;
Add remove braces for single-line control statements;
Add accessibility modifiers;
Sort accessibility modifiers;
Apply expression block/body preferences;
Apply implicit/explicit type preferences;
Apply inline out variables preferences;
Apply language/framework type preferences;
Apply object/collection initialization preferences;
Apply this qualification preferences;
Make private fields readonly when possible;
Remove unnecessary casts;
Remove unused variables;</source>
Automatically format on paste;</source>
<target state="needs-review-translation">Formatta automaticamente istruzione dopo l'immissione del punto e virgola;Formatta automaticamente blocco dopo l'immissione della parentesi graffa;Formatta automaticamente dopo operazione Incolla;Pulizia codice</target>
<note>C# Formatting &gt; General options page keywords</note>
</trans-unit>
......
......@@ -84,24 +84,7 @@ prefer auto properties;</source>
Automatically format statement on semicolon ;
Automatically format block on end brace;
Automatically format on return;
Automatically format on paste;
Format Document Settings;
Apply all C# formatting rules indentation, wrapping, spacing;
Perform additional code cleanup during formatting;
Remove unnecessary usings;
Sort usings;
Add remove braces for single-line control statements;
Add accessibility modifiers;
Sort accessibility modifiers;
Apply expression block/body preferences;
Apply implicit/explicit type preferences;
Apply inline out variables preferences;
Apply language/framework type preferences;
Apply object/collection initialization preferences;
Apply this qualification preferences;
Make private fields readonly when possible;
Remove unnecessary casts;
Remove unused variables;</source>
Automatically format on paste;</source>
<target state="needs-review-translation">セミコロンでステートメントをオート フォーマットする;中かっこでブロックをオート フォーマットする;貼り付け時にオート フォーマットする;コードをクリーンアップする</target>
<note>C# Formatting &gt; General options page keywords</note>
</trans-unit>
......
......@@ -84,24 +84,7 @@ prefer auto properties;</source>
Automatically format statement on semicolon ;
Automatically format block on end brace;
Automatically format on return;
Automatically format on paste;
Format Document Settings;
Apply all C# formatting rules indentation, wrapping, spacing;
Perform additional code cleanup during formatting;
Remove unnecessary usings;
Sort usings;
Add remove braces for single-line control statements;
Add accessibility modifiers;
Sort accessibility modifiers;
Apply expression block/body preferences;
Apply implicit/explicit type preferences;
Apply inline out variables preferences;
Apply language/framework type preferences;
Apply object/collection initialization preferences;
Apply this qualification preferences;
Make private fields readonly when possible;
Remove unnecessary casts;
Remove unused variables;</source>
Automatically format on paste;</source>
<target state="needs-review-translation">세미콜론 입력 시 문 서식 자동 지정;중괄호 입력 시 블록 서식 자동 지정;붙여넣을 때 서식 자동 지정;코드 정리;</target>
<note>C# Formatting &gt; General options page keywords</note>
</trans-unit>
......
......@@ -84,24 +84,7 @@ prefer auto properties;</source>
Automatically format statement on semicolon ;
Automatically format block on end brace;
Automatically format on return;
Automatically format on paste;
Format Document Settings;
Apply all C# formatting rules indentation, wrapping, spacing;
Perform additional code cleanup during formatting;
Remove unnecessary usings;
Sort usings;
Add remove braces for single-line control statements;
Add accessibility modifiers;
Sort accessibility modifiers;
Apply expression block/body preferences;
Apply implicit/explicit type preferences;
Apply inline out variables preferences;
Apply language/framework type preferences;
Apply object/collection initialization preferences;
Apply this qualification preferences;
Make private fields readonly when possible;
Remove unnecessary casts;
Remove unused variables;</source>
Automatically format on paste;</source>
<target state="needs-review-translation">Automatycznie sformatuj instrukcję w pozycji średnika;Automatycznie sformatuj blok w pozycji nawiasu klamrowego;Automatycznie sformatuj przy wklejeniu;czyszczenie kodu;</target>
<note>C# Formatting &gt; General options page keywords</note>
</trans-unit>
......
......@@ -84,24 +84,7 @@ prefer auto properties;</source>
Automatically format statement on semicolon ;
Automatically format block on end brace;
Automatically format on return;
Automatically format on paste;
Format Document Settings;
Apply all C# formatting rules indentation, wrapping, spacing;
Perform additional code cleanup during formatting;
Remove unnecessary usings;
Sort usings;
Add remove braces for single-line control statements;
Add accessibility modifiers;
Sort accessibility modifiers;
Apply expression block/body preferences;
Apply implicit/explicit type preferences;
Apply inline out variables preferences;
Apply language/framework type preferences;
Apply object/collection initialization preferences;
Apply this qualification preferences;
Make private fields readonly when possible;
Remove unnecessary casts;
Remove unused variables;</source>
Automatically format on paste;</source>
<target state="needs-review-translation">Formatar automaticamente a instrução concluída com ponto e vírgula;Formatar automaticamente o bloco concluído com chave;Formatar automaticamente ao colar;limpeza de código;</target>
<note>C# Formatting &gt; General options page keywords</note>
</trans-unit>
......
......@@ -84,24 +84,7 @@ prefer auto properties;</source>
Automatically format statement on semicolon ;
Automatically format block on end brace;
Automatically format on return;
Automatically format on paste;
Format Document Settings;
Apply all C# formatting rules indentation, wrapping, spacing;
Perform additional code cleanup during formatting;
Remove unnecessary usings;
Sort usings;
Add remove braces for single-line control statements;
Add accessibility modifiers;
Sort accessibility modifiers;
Apply expression block/body preferences;
Apply implicit/explicit type preferences;
Apply inline out variables preferences;
Apply language/framework type preferences;
Apply object/collection initialization preferences;
Apply this qualification preferences;
Make private fields readonly when possible;
Remove unnecessary casts;
Remove unused variables;</source>
Automatically format on paste;</source>
<target state="needs-review-translation">Автоматически форматировать оператор при вводе точки с запятой;Автоматически форматировать блок при вводе фигурной скобки;Автоматически форматировать при вставке;очистить код;</target>
<note>C# Formatting &gt; General options page keywords</note>
</trans-unit>
......
......@@ -84,24 +84,7 @@ prefer auto properties;</source>
Automatically format statement on semicolon ;
Automatically format block on end brace;
Automatically format on return;
Automatically format on paste;
Format Document Settings;
Apply all C# formatting rules indentation, wrapping, spacing;
Perform additional code cleanup during formatting;
Remove unnecessary usings;
Sort usings;
Add remove braces for single-line control statements;
Add accessibility modifiers;
Sort accessibility modifiers;
Apply expression block/body preferences;
Apply implicit/explicit type preferences;
Apply inline out variables preferences;
Apply language/framework type preferences;
Apply object/collection initialization preferences;
Apply this qualification preferences;
Make private fields readonly when possible;
Remove unnecessary casts;
Remove unused variables;</source>
Automatically format on paste;</source>
<target state="needs-review-translation">Noktalı virgül girildiğinde deyimi otomatik biçimlendir;Küme ayracı girildiğinde bloğu otomatik biçimlendir;Yapıştırma sonrasında otomatik biçimlendir;kod temizleme;</target>
<note>C# Formatting &gt; General options page keywords</note>
</trans-unit>
......
......@@ -84,24 +84,7 @@ prefer auto properties;</source>
Automatically format statement on semicolon ;
Automatically format block on end brace;
Automatically format on return;
Automatically format on paste;
Format Document Settings;
Apply all C# formatting rules indentation, wrapping, spacing;
Perform additional code cleanup during formatting;
Remove unnecessary usings;
Sort usings;
Add remove braces for single-line control statements;
Add accessibility modifiers;
Sort accessibility modifiers;
Apply expression block/body preferences;
Apply implicit/explicit type preferences;
Apply inline out variables preferences;
Apply language/framework type preferences;
Apply object/collection initialization preferences;
Apply this qualification preferences;
Make private fields readonly when possible;
Remove unnecessary casts;
Remove unused variables;</source>
Automatically format on paste;</source>
<target state="needs-review-translation">输入分号时自动设置语句的格式;输入大括号时自动设置块的格式;粘贴时自动设置格式;代码清理;</target>
<note>C# Formatting &gt; General options page keywords</note>
</trans-unit>
......
......@@ -84,24 +84,7 @@ prefer auto properties;</source>
Automatically format statement on semicolon ;
Automatically format block on end brace;
Automatically format on return;
Automatically format on paste;
Format Document Settings;
Apply all C# formatting rules indentation, wrapping, spacing;
Perform additional code cleanup during formatting;
Remove unnecessary usings;
Sort usings;
Add remove braces for single-line control statements;
Add accessibility modifiers;
Sort accessibility modifiers;
Apply expression block/body preferences;
Apply implicit/explicit type preferences;
Apply inline out variables preferences;
Apply language/framework type preferences;
Apply object/collection initialization preferences;
Apply this qualification preferences;
Make private fields readonly when possible;
Remove unnecessary casts;
Remove unused variables;</source>
Automatically format on paste;</source>
<target state="needs-review-translation">於分號處自動格式化陳述式; 於大括弧處自動格式化區塊; 貼上時自動格式化; 清除程式碼;</target>
<note>C# Formatting &gt; General options page keywords</note>
</trans-unit>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册