protected override void OnDocumentTextChanged(Document document) { DocumentState documentState; if (!openDocumentState.TryGetValue(document.Id, out documentState)) { return; } var fixup = TryFixDocumentSyntaxTreeAsync(document).Result; documentState.IsSubmissionComplete = fixup.Item1; if (fixup.Item2 != null) { SetCurrentSolution(CurrentSolution .WithDocumentSyntaxRoot( document.Id, fixup.Item2.GetRoot())); } }
public void UpdateDocument(DocumentId documentId, SyntaxNode syntaxNode) { // TODO: This is not protected by the _serializationLock this.SetCurrentSolution(CurrentSolution.WithDocumentSyntaxRoot(documentId, syntaxNode)); OnDocumentTextChanged(GetDocument(documentId)); }