Changing the format of the messages to be based on language server protocol 2.0

This commit is contained in:
Leila Lali
2016-08-24 15:16:43 -07:00
parent 5425e70f1f
commit d96b4e5a4a
6 changed files with 79 additions and 26 deletions

View File

@@ -181,7 +181,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Workspace
// A text change notification can batch multiple change requests
foreach (var textChange in textChangeParams.ContentChanges)
{
string fileUri = textChangeParams.Uri ?? textChangeParams.TextDocument.Uri;
string fileUri = textChangeParams.TextDocument.Uri ?? textChangeParams.TextDocument.Uri;
msg.AppendLine(string.Format(" File: {0}", fileUri));
ScriptFile changedFile = Workspace.GetFile(fileUri);
@@ -207,7 +207,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Workspace
Logger.Write(LogLevel.Verbose, "HandleDidOpenTextDocumentNotification");
// read the SQL file contents into the ScriptFile
ScriptFile openedFile = Workspace.GetFileBuffer(openParams.Uri, openParams.Text);
ScriptFile openedFile = Workspace.GetFileBuffer(openParams.TextDocument.Uri, openParams.TextDocument.Text);
// Propagate the changes to the event handlers
var textDocOpenTasks = TextDocOpenCallbacks.Select(
@@ -217,7 +217,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Workspace
}
protected Task HandleDidCloseTextDocumentNotification(
TextDocumentIdentifier closeParams,
DidCloseTextDocumentParams closeParams,
EventContext eventContext)
{
Logger.Write(LogLevel.Verbose, "HandleDidCloseTextDocumentNotification");