public override async Task DidOpenTextDocument(DidOpenTextDocumentParams @params) { TraceMessage($"Opening document {@params.textDocument.uri}"); var entry = _projectFiles.GetEntry(@params.textDocument.uri, throwIfMissing: false); var doc = entry as IDocument; if (doc != null) { if (@params.textDocument.text != null) { doc.ResetDocument(@params.textDocument.version, @params.textDocument.text); } } else if (entry == null) { IAnalysisCookie cookie = null; if (@params.textDocument.text != null) { cookie = new InitialContentCookie { Content = @params.textDocument.text, Version = @params.textDocument.version }; } entry = await AddFileAsync(@params.textDocument.uri, null, cookie); } if ((doc = entry as IDocument) != null) { EnqueueItem(doc); } }
public virtual Task DidOpenTextDocument(DidOpenTextDocumentParams @params) => Task.CompletedTask;
public virtual async Task DidOpenTextDocument(DidOpenTextDocumentParams @params) { }