Skip to content

Conversation

CyrusNajmabadi
Copy link
Member

No description provided.

{
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)
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 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 ...'

Copy link
Member

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();
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants