194 references to CodeActionPriority
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersCodeFixProvider.cs (3)
30var priority = diagnostic.Severity == DiagnosticSeverity.Hidden 31? CodeActionPriority.Low 32: CodeActionPriority.Default;
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (1)
302var codeAction = CodeAction.Create(title, action, equivalenceKey, CodeActionPriority.High);
src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (1)
49CodeActionPriority.High);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (1)
51protected void RegisterCodeFix(CodeFixContext context, string title, string equivalenceKey, CodeActionPriority priority, Diagnostic? diagnostic = null)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (9)
src\Analyzers\CSharp\CodeFixes\MakeAnonymousFunctionStatic\CSharpMakeAnonymousFunctionStaticCodeFixProvider.cs (2)
33context.Diagnostics[0].Severity > DiagnosticSeverity.Hidden ? CodeActionPriority.Default : CodeActionPriority.Low);
src\Analyzers\CSharp\CodeFixes\RemoveUnreachableCode\CSharpRemoveUnreachableCodeCodeFixProvider.cs (3)
35var priority = IsSubsequentSection(diagnostic) 36? CodeActionPriority.Low 37: CodeActionPriority.Default;
src\Analyzers\CSharp\CodeFixes\UseExpressionBody\UseExpressionBodyCodeFixProvider.cs (3)
43var priority = diagnostic.Severity == DiagnosticSeverity.Hidden 44? CodeActionPriority.Low 45: CodeActionPriority.Default;
src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
67CodeActionPriority.Low);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
CodeActions\AddUsing\AbstractAddUsingTests.cs (1)
37CodeActionPriority? priority = null,
Microsoft.CodeAnalysis.CSharp.Features (31)
ConvertBetweenRegularAndVerbatimString\AbstractConvertBetweenRegularAndVerbatimStringCodeRefactoringProvider.cs (2)
67CodeActionPriority.Low)); 77CodeActionPriority.Low));
ConvertProgram\ConvertToProgramMainCodeFixProvider.cs (3)
41var priority = options.PreferTopLevelStatements.Notification.Severity == ReportDiagnostic.Hidden 42? CodeActionPriority.Low 43: CodeActionPriority.Default;
ConvertProgram\ConvertToProgramMainCodeRefactoringProvider.cs (1)
60CodeActionPriority.Low));
ConvertProgram\ConvertToTopLevelStatementsCodeFixProvider.cs (3)
41var priority = options.PreferTopLevelStatements.Notification.Severity == ReportDiagnostic.Hidden 42? CodeActionPriority.Low 43: CodeActionPriority.Default;
ConvertProgram\ConvertToTopLevelStatementsCodeRefactoringProvider.cs (1)
63CodeActionPriority.Low));
ConvertToRawString\CanConvertParams.cs (2)
9internal readonly struct CanConvertParams(CodeActionPriority priority, bool canBeSingleLine, bool canBeMultiLineWithoutLeadingWhiteSpaces) 11public CodeActionPriority Priority { get; } = priority;
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (4)
78var priority = CodeActionPriority.Low; 127if (priority == CodeActionPriority.Low && 131priority = CodeActionPriority.Default;
ConvertToRawString\ConvertRegularStringToRawStringCodeRefactoringProvider.cs (3)
101var priority = AllEscapesAreQuotes(characters) ? CodeActionPriority.Default : CodeActionPriority.Low;
Copilot\CSharpCopilotCodeFixProvider.cs (1)
121priority: CodeActionPriority.Low);
Copilot\CSharpCopilotCodeFixProvider.DocumentChangeCodeAction.cs (1)
26CodeActionPriority priority) : CodeAction.DocumentChangeAction(title, createChangedDocument, equivalenceKey, priority)
src\Analyzers\CSharp\CodeFixes\MakeAnonymousFunctionStatic\CSharpMakeAnonymousFunctionStaticCodeFixProvider.cs (2)
33context.Diagnostics[0].Severity > DiagnosticSeverity.Hidden ? CodeActionPriority.Default : CodeActionPriority.Low);
src\Analyzers\CSharp\CodeFixes\RemoveUnreachableCode\CSharpRemoveUnreachableCodeCodeFixProvider.cs (3)
35var priority = IsSubsequentSection(diagnostic) 36? CodeActionPriority.Low 37: CodeActionPriority.Default;
src\Analyzers\CSharp\CodeFixes\UseExpressionBody\UseExpressionBodyCodeFixProvider.cs (3)
43var priority = diagnostic.Severity == DiagnosticSeverity.Hidden 44? CodeActionPriority.Low 45: CodeActionPriority.Default;
src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
67CodeActionPriority.Low);
UsePatternMatching\CSharpIsAndCastCheckWithoutNameCodeFixProvider.cs (1)
42CodeActionPriority.Low),
Microsoft.CodeAnalysis.EditorFeatures (2)
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (2)
55protected sealed override CodeActionPriority ComputePriority() 56=> CodeActionPriority.High;
Microsoft.CodeAnalysis.EditorFeatures.Wpf (5)
Suggestions\SuggestedActionsSource_Async.cs (5)
319static SuggestedActionSetPriority ConvertToSuggestedActionSetPriority(CodeActionPriority priority) 322CodeActionPriority.Lowest => SuggestedActionSetPriority.None, 323CodeActionPriority.Low => SuggestedActionSetPriority.Low, 324CodeActionPriority.Default => SuggestedActionSetPriority.Medium, 325CodeActionPriority.High => SuggestedActionSetPriority.High,
Microsoft.CodeAnalysis.Features (53)
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (6)
66private static async Task<(TTypeDeclarationSyntax type, CodeActionPriority priority)?> GetRelevantTypeFromHeaderAsync(CodeRefactoringContext context) 72return (type, CodeActionPriority.Low); 75private static async Task<(TTypeDeclarationSyntax type, CodeActionPriority priority)?> GetRelevantTypeFromMethodAsync(CodeRefactoringContext context) 95var priority = isDebuggerDisplayMethod ? CodeActionPriority.Default : CodeActionPriority.Low;
AddImport\AddImportFixData.cs (5)
59public readonly CodeActionPriority Priority = priority; 113public static AddImportFixData CreateForProjectSymbol(ImmutableArray<TextChange> textChanges, string title, ImmutableArray<string> tags, CodeActionPriority priority, ProjectId projectReferenceToAdd) 121public static AddImportFixData CreateForMetadataSymbol(ImmutableArray<TextChange> textChanges, string title, ImmutableArray<string> tags, CodeActionPriority priority, ProjectId portableExecutableReferenceProjectId, string portableExecutableReferenceFilePathToAdd) 135priority: CodeActionPriority.Low, 143priority: CodeActionPriority.Low,
AddImport\CodeActions\AddImportCodeAction.cs (2)
25private readonly CodeActionPriority _priority; 59protected sealed override CodeActionPriority ComputePriority()
AddImport\References\MetadataSymbolReference.cs (3)
52ImmutableArray<string> tags, CodeActionPriority priority) 60protected override CodeActionPriority GetPriority(Document document) 61=> CodeActionPriority.Low;
AddImport\References\ProjectSymbolReference.cs (4)
53protected override CodeActionPriority GetPriority(Document document) 66return CodeActionPriority.High; 71return CodeActionPriority.Low; 76ImmutableArray<string> tags, CodeActionPriority priority)
AddImport\References\SymbolReference.cs (2)
119string description, ImmutableArray<string> tags, CodeActionPriority priority); 121protected abstract CodeActionPriority GetPriority(Document document);
AddPackage\ParentInstallPackageCodeAction.cs (2)
62priority: CodeActionPriority.Low) // Adding a nuget reference is lower priority than other fixes.. 126AddImportFixKind.PackageSymbol, installData.TextChanges, title, priority: CodeActionPriority.Lowest,
CodeFixes\AbstractConfigurationActionWithNestedActions.cs (3)
19priority: CodeActionPriority.Lowest) // Put configurations/suppressions at the end of everything. 28internal virtual CodeActionPriority AdditionalPriority => CodeActionPriority.Default;
CodeFixes\Configuration\ConfigureSeverity\ConfigureSeverityLevelCodeFixProvider.TopLevelBulkConfigureSeverityCodeAction.cs (3)
17internal override CodeActionPriority AdditionalPriority { get; } = category != null ? CodeActionPriority.Low : CodeActionPriority.Lowest;
CodeFixes\Suppression\NestedSuppressionCodeAction.cs (2)
23protected sealed override CodeActionPriority ComputePriority() 24=> CodeActionPriority.Lowest;
ConvertToInterpolatedString\ConvertRegularStringToInterpolatedStringRefactoringProvider.cs (1)
79CodeActionPriority.Low),
ExtractClass\ExtractClassWithDialogCodeAction.cs (4)
42private readonly CodeActionPriority _priority = selectedMembers.IsEmpty ? CodeActionPriority.Default : CodeActionPriority.Low; 49protected sealed override CodeActionPriority ComputePriority()
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (2)
102actions.Value.actions, isInlinable: false, priority: CodeActionPriority.Low), 111actions.Value.actionsAllOccurrences, isInlinable: false, priority: CodeActionPriority.Low),
MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceCodeRefactoringProvider.cs (1)
49CodeActionPriority.Low),
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (2)
189CodeActionPriority.Low), 217CodeActionPriority.Low);
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersCodeFixProvider.cs (3)
30var priority = diagnostic.Severity == DiagnosticSeverity.Hidden 31? CodeActionPriority.Low 32: CodeActionPriority.Default;
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (1)
302var codeAction = CodeAction.Create(title, action, equivalenceKey, CodeActionPriority.High);
src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (1)
49CodeActionPriority.High);
src\Analyzers\Core\CodeFixes\UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs (1)
128: base(title, createChangedSolution, equivalenceKey: null, priority: CodeActionPriority.Default, createdFromFactoryMethod: true)
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (3)
65var priority = diagnostic.Severity == DiagnosticSeverity.Hidden 66? CodeActionPriority.Low 67: CodeActionPriority.Default;
Wrapping\AbstractCodeActionComputer.cs (1)
303group.IsInlinable, CodeActionPriority.Low));
Wrapping\WrapItemsAction.cs (1)
23: DocumentChangeAction(title, createChangedDocument, GetSortTitle(parentTitle, title), CodeActionPriority.Low)
Microsoft.CodeAnalysis.LanguageServer.Protocol (32)
Features\UnifiedSuggestions\UnifiedSuggestedActions\IUnifiedSuggestedAction.cs (1)
18CodeActionPriority CodeActionPriority { get; }
Features\UnifiedSuggestions\UnifiedSuggestedActions\UnifiedCodeFixSuggestedAction.cs (1)
26CodeActionPriority codeActionPriority,
Features\UnifiedSuggestions\UnifiedSuggestedActions\UnifiedCodeRefactoringSuggestedAction.cs (1)
24CodeActionPriority codeActionPriority,
Features\UnifiedSuggestions\UnifiedSuggestedActions\UnifiedFixAllCodeFixSuggestedAction.cs (1)
24CodeActionPriority codeActionPriority,
Features\UnifiedSuggestions\UnifiedSuggestedActions\UnifiedFixAllCodeRefactoringSuggestedAction.cs (1)
22CodeActionPriority codeActionPriority,
Features\UnifiedSuggestions\UnifiedSuggestedActions\UnifiedSuggestedAction.cs (2)
19public CodeActionPriority CodeActionPriority { get; } 21public UnifiedSuggestedAction(Workspace workspace, CodeAction codeAction, CodeActionPriority codeActionPriority)
Features\UnifiedSuggestions\UnifiedSuggestedActions\UnifiedSuggestedActionWithNestedActions.cs (1)
23CodeActionPriority codeActionPriority,
Features\UnifiedSuggestions\UnifiedSuggestedActionSet.cs (2)
25public CodeActionPriority Priority { get; } 34CodeActionPriority priority,
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (16)
22using CodeFixGroupKey = System.Tuple<Microsoft.CodeAnalysis.Diagnostics.DiagnosticData, Microsoft.CodeAnalysis.CodeActions.CodeActionPriority, Microsoft.CodeAnalysis.CodeActions.CodeActionPriority?>; 263priority: CodeActionPriority.Lowest, 273/// cref="CodeActionPriority.Default"/> by default. The only exception is the case where a <see 275/// cref="UnifiedSuggestedActionSet"/>s is set to <see cref="CodeActionPriority.Lowest"/> so that suppression 313priority: CodeActionPriority.Lowest, 336priority: CodeActionPriority.Lowest, 395var priority = group.Key; 501/// <see cref="CodeActionPriority.Low"/> and should show up after fixes but before 630priority: CodeActionPriority.Lowest, 692s => s.Priority == CodeActionPriority.High); 694s => s.Priority != CodeActionPriority.High) 695.SelectAsArray(s => WithPriority(s, CodeActionPriority.Low)); 697var highPriFixes = fixes.WhereAsArray(s => s.Priority == CodeActionPriority.High); 698var nonHighPriFixes = fixes.WhereAsArray(s => s.Priority != CodeActionPriority.High); 711UnifiedSuggestedActionSet set, CodeActionPriority priority)
Handler\CodeActions\CodeActionHelpers.cs (6)
218CodeActionPriority setPriority, 416private static LSP.VSInternalPriorityLevel? UnifiedSuggestedActionSetPriorityToPriorityLevel(CodeActionPriority priority) 419CodeActionPriority.Lowest => LSP.VSInternalPriorityLevel.Lowest, 420CodeActionPriority.Low => LSP.VSInternalPriorityLevel.Low, 421CodeActionPriority.Default => LSP.VSInternalPriorityLevel.Normal, 422CodeActionPriority.High => LSP.VSInternalPriorityLevel.High,
Microsoft.CodeAnalysis.Workspaces (55)
CodeActions\CodeAction.cs (52)
39/// cref="CodeActionPriority.High"/> priority class. 86/// <see cref="CodeActionPriority.Default"/> if not overridden. 88public CodeActionPriority Priority 92var priority = ComputePriority(); 93if (priority < CodeActionPriority.Lowest) 94priority = CodeActionPriority.Lowest; 96if (priority > CodeActionPriority.High) 97priority = CodeActionPriority.High; 99if (priority == CodeActionPriority.High && !this.CustomTags.Contains(CanBeHighPriorityTag)) 100priority = CodeActionPriority.Default; 132/// Computes the <see cref="CodeActionPriority"/> group this code action should be presented in. Legal values 133/// this can be must be between <see cref="CodeActionPriority.Lowest"/> and <see cref="CodeActionPriority.High"/>. 137/// cref="CodeActionPriority.High"/> may be downgraded to <see cref="CodeActionPriority.Default"/> as they 140protected virtual CodeActionPriority ComputePriority() 141=> CodeActionPriority.Default; 503=> Create(title, createChangedDocument, equivalenceKey, CodeActionPriority.Default); 508public static CodeAction Create(string title, Func<CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 511/// <inheritdoc cref="Create(string, Func{CancellationToken, Task{Document}}, string?, CodeActionPriority)"/> 513public static CodeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 533=> Create(title, createChangedSolution, equivalenceKey, CodeActionPriority.Default); 543public static CodeAction Create(string title, Func<CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 546/// <inheritdoc cref="Create(string, Func{CancellationToken, Task{Solution}}, string?, CodeActionPriority)"/> 548public static CodeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 568=> Create(title, nestedActions, isInlinable, priority: CodeActionPriority.Default); 573public static CodeAction Create(string title, ImmutableArray<CodeAction> nestedActions, bool isInlinable, CodeActionPriority priority = CodeActionPriority.Default) 587CodeActionPriority priority, 593protected sealed override CodeActionPriority ComputePriority() 610CodeActionPriority priority, 623CodeActionPriority priority = CodeActionPriority.Default) 632CodeActionPriority priority = CodeActionPriority.Default) 666CodeActionPriority priority, 677CodeActionPriority priority = CodeActionPriority.Default) 686CodeActionPriority priority = CodeActionPriority.Default) 701CodeActionPriority priority, 712CodeActionPriority priority = CodeActionPriority.Default) 721CodeActionPriority priority = CodeActionPriority.Default) 733CodeActionPriority priority, 742CodeActionPriority priority = CodeActionPriority.Default)
CodeFixes\CodeFixProvider.cs (1)
44/// this can be must be between <see cref="CodeActionRequestPriority.Low"/> and <see cref="CodeActionPriority.High"/>.
CodeRefactorings\CodeRefactoringProvider.cs (1)
38/// this can be must be between <see cref="CodeActionRequestPriority.Low"/> and <see cref="CodeActionPriority.High"/>.
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (1)
51protected void RegisterCodeFix(CodeFixContext context, string title, string equivalenceKey, CodeActionPriority priority, Diagnostic? diagnostic = null)