-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Implement support for CodeRefactoringProvider in NuGet packages #35685
Conversation
src/Features/Core/Portable/CodeRefactorings/CodeRefactoringService.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/CodeRefactorings/CodeRefactoringService.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/CodeRefactorings/CodeRefactoringService.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/CodeRefactorings/CodeRefactoringService.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/CodeRefactorings/CodeRefactoringService.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/CodeRefactorings/CodeRefactoringService.cs
Outdated
Show resolved
Hide resolved
return builder.ToImmutable(); | ||
} | ||
|
||
private class ProjectCodeRefactoringProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: consider extracting to its own file.
nit: i'm on the fence if 'Project' or 'AnalyzerReference' is preferred in the name here. I kinda like AnalyzerReferenceCodeRefactoringsProvider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied the pattern from CodeFixService
. One option is to make a follow-up to change both to something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we extract most of the common functionality between this class and ProjectCodeFixProvider into a common generic base type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. looks very shareable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving this for a follow-up
Overall i really like this. Some small nits/suggestions! :) |
src/Features/Core/Portable/CodeRefactorings/CodeRefactoringService.cs
Outdated
Show resolved
Hide resolved
Any luck on pushing this PR forward? I'm hoping to add a refactoring that will be useful to the compiler team (#2588, depends on this PR). |
@jcouv A quicker approach might be to change the refactoring into a pair of analyzer/fixer with hidden diagnostics. This will also provide FixAll support which is still missing for refactorings. |
@sharwell Any luck pushing this PR forward? Are there any major issues to be solved, or just feedback to address? |
@sharwell Any luck pushing this PR forward? |
1 similar comment
@sharwell Any luck pushing this PR forward? |
@jcouv I was working to refactor the services to support completion providers as well. The initial refactoring to simplify completion provider registration is waiting for VS for Mac validation. |
eed3c2c
to
11fe720
Compare
11fe720
to
632138d
Compare
Fixes #32705