-
Notifications
You must be signed in to change notification settings - Fork 4.2k
WIP: Initial work to support renaming files to match types inside in bulk #80246
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
base: main
Are you sure you want to change the base?
Conversation
{ | ||
cancellationToken.ThrowIfCancellationRequested(); | ||
previewItems.Add(new SolutionPreviewItem(documentId.ProjectId, documentId, async c => | ||
await CreateChangedDocumentPreviewViewAsync(oldSolution.GetRequiredDocument(documentId), newSolution.GetRequiredDocument(documentId), zoomLevel, c).ConfigureAwaitRunInline())); | ||
} | ||
|
||
foreach (var documentId in allChangedDocuments) |
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 was needed as otherwise we woudln't show the preview window if only renaming a file. which means there was no place to invoke 'fix all in ...'
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.
Please document this scenario. Also, are there any other changes to a document that should be considered other than name?
@@ -90,13 +91,34 @@ internal abstract class AbstractPreviewFactoryService<TDifferenceViewer>( | |||
var newProject = projectChanges.NewProject; | |||
|
|||
// Exclude changes to unchangeable documents if they will be ignored when applied to workspace. | |||
foreach (var documentId in projectChanges.GetChangedDocuments(onlyGetDocumentsWithTextChanges: true, ignoreUnchangeableDocuments)) | |||
var allChangedDocuments = projectChanges.GetChangedDocuments(onlyGetDocumentsWithTextChanges: false, ignoreUnchangeableDocuments: false).ToHashSet(); |
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.
Why would we not use ignoreUnchangeableDocuments
here? Can we update filename even if the document is unchangeable?
No description provided.