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

Enabled extract refactorings in LSP #76718

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

JoeRobich
Copy link
Member

@JoeRobich JoeRobich commented Jan 11, 2025

This PR builds on the changes in #76717

Options services are added to the LanguageServer project so that the extract refactorings will run. The options use defaults and do not require user interaction. This is part of the O# parity work and the defaults match those used by O#.

Once inserted, this will resolve dotnet/vscode-csharp#6430

@JoeRobich JoeRobich requested a review from a team as a code owner January 11, 2025 08:10
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Issues and PRs which have not yet been triaged by a lead labels Jan 11, 2025
@JoeRobich JoeRobich force-pushed the dev/jorobich/enable-extract-refactorings branch from 5399edf to b4582d8 Compare January 11, 2025 08:30
UnifiedPredefinedSuggestedActionCategoryNames.StyleFix => CodeActionKind.QuickFix,
UnifiedPredefinedSuggestedActionCategoryNames.ErrorFix => CodeActionKind.QuickFix,
_ => throw ExceptionUtilities.UnexpectedValue(categoryName)
};

private static CodeActionKind GetRefactoringKind(IUnifiedSuggestedAction suggestedAction)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Providing the proper type will have VS Code render the actions differently.
image

image

ReferenceOutputAssembly="false"
Private="false" />
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is added to parse test code markup.

@JoeRobich JoeRobich force-pushed the dev/jorobich/enable-extract-refactorings branch from b4582d8 to 51e0c13 Compare January 11, 2025 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure Needs UX Triage untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Can't extract interface
1 participant