X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=src%2FPalete%2FLanguageClientVala.vala;h=a7b9146fc47d5e06901cad5ea1f17ab16ef17a84;hb=dfef4ee4051aadf69fa6689f224aaa628ac82b01;hp=fc6d25b327cb8c79f75f700d41f2dcf5be1bde48;hpb=7cd1dfe18b9c072b577304efbf67cd39791fd079;p=roobuilder diff --git a/src/Palete/LanguageClientVala.vala b/src/Palete/LanguageClientVala.vala index fc6d25b32..a7b9146fc 100644 --- a/src/Palete/LanguageClientVala.vala +++ b/src/Palete/LanguageClientVala.vala @@ -50,7 +50,9 @@ namespace Palete { } this.countdown--; if (this.countdown < 0){ - this.document_change_force(this.change_queue_file, this.change_queue_file_source); + this.document_change_force.begin(this.change_queue_file, this.change_queue_file_source, (o, res) => { + this.document_change_force.end(res); + }); this.change_queue_file = null; } @@ -309,14 +311,14 @@ namespace Palete { } - public override void document_save (JsRender.JsRender file) + public override async void document_save (JsRender.JsRender file) { if (!this.isReady()) { return; } // save only really flags the file on the server - to actually force a change update - we need to // flag it as changed. - this.document_change_force(file, file.toSource()); + yield this.document_change_force(file, file.toSource()); this.change_queue_file = null; GLib.debug ("LS send save"); @@ -383,7 +385,9 @@ namespace Palete { public override void document_change (JsRender.JsRender file ) { if (this.change_queue_file != null && this.change_queue_file.path != file.path) { - this.document_change_force(this.change_queue_file, this.change_queue_file_source); + this.document_change_force.begin(this.change_queue_file, this.change_queue_file_source, (o, res) => { + this.document_change_force.end(res); + }); } this.countdown = 3; @@ -394,7 +398,7 @@ namespace Palete { } - public override void document_change_force (JsRender.JsRender file, string contents) + public override async void document_change_force (JsRender.JsRender file, string contents) { if (!this.isReady()) { return; @@ -410,7 +414,7 @@ namespace Palete { node.set_array(ar); this.log(LanguageClientAction.CHANGE, file.path); try { - this.jsonrpc_client.send_notification ( + yield this.jsonrpc_client.send_notification_async ( "textDocument/didChange", this.buildDict ( textDocument : this.buildDict ( ///TextDocumentItem;