Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FixAll support for code refactorings #59809

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d9f5725
FixAll public API + core fix all related types + other workspace rela…
mavasani Feb 28, 2022
7812bec
Features layer changes for FixAll support for refactorings
mavasani Feb 28, 2022
26c35ef
Unified suggestion related changes for FixAll support for refactorings
mavasani Feb 28, 2022
c6cc64f
EditorFeatures layer changes for FixAll support for refactorings
mavasani Feb 28, 2022
4630883
VisualStudio layer changes for FixAll support for refactorings
mavasani Feb 28, 2022
96cd412
Proof of concept - "Invert conditional" code refactoring enhancement …
mavasani Feb 28, 2022
f73b283
Merge remote-tracking branch 'upstream/main' into FixAllCodeRefactoring
mavasani Apr 11, 2022
c1adefd
Remove FixAllScope.Selection
mavasani Apr 11, 2022
b463620
Nullable enable
mavasani Apr 11, 2022
b41f729
Share code
mavasani Apr 11, 2022
7ef03b2
Add code refactoring specific API to IFixAllSpanMappingService and up…
mavasani Apr 12, 2022
80dc735
Cleanup to make the APIs consistent with FixAll APIs for code fixes
mavasani Apr 12, 2022
6e86cd6
Make FixAll APIs for refactorings internal for now. #60703 tracks mak…
mavasani Apr 12, 2022
b27b6ca
Fix function ID
mavasani Apr 12, 2022
09d595c
Fixes
mavasani Apr 12, 2022
b2b7cf8
Add unit tests and integration tests
mavasani Apr 13, 2022
4f20ef8
Add integration test support for FixAll for code refactorings and fix…
mavasani Apr 14, 2022
d97f240
Merge remote-tracking branch 'upstream/main' into FixAllCodeRefactoring
mavasani Apr 14, 2022
bd85c93
Fixes from merge
mavasani Apr 14, 2022
a1e77fe
Fix IDE0044
mavasani Apr 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private static async Task GetPreview(TestWorkspace workspace, CodeRefactoringPro
var suggestedAction = new CodeRefactoringSuggestedAction(
workspace.ExportProvider.GetExportedValue<IThreadingContext>(),
workspace.ExportProvider.GetExportedValue<SuggestedActionsSourceProvider>(),
workspace, textBuffer, provider, codeActions.First());
workspace, textBuffer, provider, codeActions.First(), fixAllFlavors: null);
await suggestedAction.GetPreviewAsync(CancellationToken.None);
Assert.True(extensionManager.IsDisabled(provider));
Assert.False(extensionManager.IsIgnored(provider));
Expand All @@ -85,7 +85,7 @@ private static void DisplayText(TestWorkspace workspace, CodeRefactoringProvider
var suggestedAction = new CodeRefactoringSuggestedAction(
workspace.ExportProvider.GetExportedValue<IThreadingContext>(),
workspace.ExportProvider.GetExportedValue<SuggestedActionsSourceProvider>(),
workspace, textBuffer, provider, codeActions.First());
workspace, textBuffer, provider, codeActions.First(), fixAllFlavors: null);
_ = suggestedAction.DisplayText;
Assert.True(extensionManager.IsDisabled(provider));
Assert.False(extensionManager.IsIgnored(provider));
Expand All @@ -98,7 +98,7 @@ private static async Task ActionSets(TestWorkspace workspace, CodeRefactoringPro
var suggestedAction = new CodeRefactoringSuggestedAction(
workspace.ExportProvider.GetExportedValue<IThreadingContext>(),
workspace.ExportProvider.GetExportedValue<SuggestedActionsSourceProvider>(),
workspace, textBuffer, provider, codeActions.First());
workspace, textBuffer, provider, codeActions.First(), fixAllFlavors: null);
_ = await suggestedAction.GetActionSetsAsync(CancellationToken.None);
Assert.True(extensionManager.IsDisabled(provider));
Assert.False(extensionManager.IsIgnored(provider));
Expand Down
Loading