[gnome-builder] lsp: implemented window/showMessage



commit 7b36c050859c01ad654481e46940e342f035b7d1
Author: Günther Wagner <info gunibert de>
Date:   Sat Nov 13 10:17:50 2021 +0100

    lsp: implemented window/showMessage
    
    This shows messages from the Language Server in the Messages Panel for further information. For example 
it can show that the language server is not able to parse all dependencies from a Cargo file because its not 
available anymore.

 src/libide/lsp/ide-lsp-client.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/libide/lsp/ide-lsp-client.c b/src/libide/lsp/ide-lsp-client.c
index 92cc475f1..290f363de 100644
--- a/src/libide/lsp/ide-lsp-client.c
+++ b/src/libide/lsp/ide-lsp-client.c
@@ -895,6 +895,12 @@ ide_lsp_client_real_notification (IdeLspClient *self,
           if (ide_str_equal0 (kind, "end") && notification != NULL)
             ide_notification_withdraw (notification);
         }
+      else if (g_str_equal (method, "window/showMessage"))
+        {
+          const gchar *message = NULL;
+          JSONRPC_MESSAGE_PARSE (params, "message", JSONRPC_MESSAGE_GET_STRING (&message));
+          ide_object_warning (self, "%s", message);
+        }
     }
 
   IDE_EXIT;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]