Skip to content

Commit 8141f7e

Browse files
Merge branch 'topic/als#1289' into 'master'
Override the logger for CodeAction responses See merge request eng/ide/ada_language_server!1492
2 parents 66461de + c448a5b commit 8141f7e

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

source/server/lsp-secure_message_loggers.adb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,24 @@ package body LSP.Secure_Message_Loggers is
255255
Self.Output.New_Line (Ok);
256256
end On_Symbol_Response;
257257

258+
----------------------------
259+
-- On_CodeAction_Response --
260+
----------------------------
261+
262+
overriding procedure On_CodeAction_Response
263+
(Self : in out Client_Response_Logger;
264+
Id : LSP.Structures.Integer_Or_Virtual_String;
265+
Value : LSP.Structures.Command_Or_CodeAction_Vector_Or_Null) is
266+
Ok : Boolean := False;
267+
begin
268+
Self.Output.Put ("'textDocument/codeAction'", Ok);
269+
Self.Put_Id (Id, Ok);
270+
Self.Output.Put (" result : ", Ok);
271+
Self.Output.Put
272+
(VSS.Strings.To_Virtual_String (Value.Length'Wide_Wide_Image), Ok);
273+
Self.Output.New_Line (Ok);
274+
end On_CodeAction_Response;
275+
258276
-------------------------------
259277
-- On_DidChange_Notification --
260278
-------------------------------

source/server/lsp-secure_message_loggers.ads

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ package LSP.Secure_Message_Loggers is
7070
Id : LSP.Structures.Integer_Or_Virtual_String;
7171
Value : LSP.Structures.SemanticTokens_Or_Null);
7272

73+
overriding procedure On_CodeAction_Response
74+
(Self : in out Client_Response_Logger;
75+
Id : LSP.Structures.Integer_Or_Virtual_String;
76+
Value : LSP.Structures.Command_Or_CodeAction_Vector_Or_Null);
77+
7378
overriding procedure On_Symbol_Response
7479
(Self : in out Client_Response_Logger;
7580
Id : LSP.Structures.Integer_Or_Virtual_String;

0 commit comments

Comments
 (0)