提交 aaf5279a 编写于 作者: O Omar Tawfik

If no IDocumentDifferenceService is exported, consider the whole document changed

上级 7259d90b
......@@ -543,7 +543,14 @@ private async Task EnqueueProjectConfigurationChangeWorkItemAsync(ProjectChanges
private async Task EnqueueWorkItemAsync(Document oldDocument, Document newDocument)
{
var differenceService = newDocument.GetLanguageService<IDocumentDifferenceService>();
if (differenceService != null)
if (differenceService == null)
{
/// For languages that don't use a Roslyn syntax tree, they don't export a <see cref="IDocumentDifferenceService"/>
/// So we should consider the whole document changed.
await EnqueueWorkItemAsync(newDocument, InvocationReasons.DocumentChanged).ConfigureAwait(false);
}
else
{
var differenceResult = await differenceService.GetDifferenceAsync(oldDocument, newDocument, _shutdownToken).ConfigureAwait(false);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册