-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Disable extract class/interface to a new file when unsupported by the workspace. #76717
Conversation
@@ -33,14 +31,12 @@ internal sealed class TestExtractInterfaceOptionsService() : IExtractInterfaceOp | |||
public bool SameFile { get; set; } | |||
|
|||
public ExtractInterfaceOptionsResult GetExtractInterfaceOptions( | |||
ISyntaxFactsService syntaxFactsService, | |||
INotificationService notificationService, | |||
Document document, |
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.
The services and language can be pulled from the document.
var solution = context.Document.Project.Solution; | ||
if (!solution.CanApplyChange(ApplyChangesKind.AddDocument)) |
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.
This will now be handled by disabling the new file option on the extract dialog.
@@ -20,7 +20,8 @@ internal class NewTypeDestinationSelectionViewModel : AbstractNotifyPropertyChan | |||
string.Empty, | |||
string.Empty, | |||
[], | |||
null | |||
null, | |||
false |
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.
named parameters.
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.
love the simplification.
Doing this as part of the work to bring these extract refactorings to the LSP.
This PR does two things: