File tree Expand file tree Collapse file tree 5 files changed +91
-0
lines changed Expand file tree Collapse file tree 5 files changed +91
-0
lines changed Original file line number Diff line number Diff line change
1
+ --
2
+ -- Copyright (C) 2024, AdaCore
3
+ --
4
+ -- SPDX-License-Identifier: Apache-2.0
5
+ --
6
+
7
+ with VSS.Strings ;
8
+
9
+ procedure LSP.Inputs .Read_ResponseError
10
+ (Stream : in out VSS.JSON.Pull_Readers.JSON_Pull_Reader'Class;
11
+ Value : out LSP.Errors.ResponseError)
12
+ is
13
+ use type VSS.Strings.Virtual_String;
14
+
15
+ begin
16
+ pragma Assert (Stream.Is_Start_Object);
17
+ Stream.Read_Next;
18
+
19
+ while not Stream.Is_End_Object loop
20
+ pragma Assert (Stream.Is_Key_Name);
21
+
22
+ declare
23
+ Key : constant VSS.Strings.Virtual_String := Stream.Key_Name;
24
+
25
+ begin
26
+ Stream.Read_Next;
27
+
28
+ if Key = " code" then
29
+ LSP.Inputs.Read_ErrorCodes (Stream, Value.code);
30
+
31
+ elsif Key = " message" then
32
+ Value.message := Stream.String_Value;
33
+ Stream.Read_Next;
34
+
35
+ else
36
+ Stream.Skip_Current_Value;
37
+ end if ;
38
+ end ;
39
+ end loop ;
40
+
41
+ Stream.Read_Next;
42
+ end LSP.Inputs.Read_ResponseError ;
Original file line number Diff line number Diff line change
1
+ --
2
+ -- Copyright (C) 2024, AdaCore
3
+ --
4
+ -- SPDX-License-Identifier: Apache-2.0
5
+ --
6
+
7
+ with VSS.JSON.Pull_Readers ;
8
+ with LSP.Errors ;
9
+
10
+ procedure LSP.Inputs .Read_ResponseError
11
+ (Stream : in out VSS.JSON.Pull_Readers.JSON_Pull_Reader'Class;
12
+ Value : out LSP.Errors.ResponseError);
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ package LSP.Structures.Hashes is
12
12
(Item : LSP.Structures.Integer_Or_Virtual_String)
13
13
return Ada.Containers.Hash_Type;
14
14
15
+ function Hash
16
+ (Item : LSP.Structures.ProgressToken) return Ada.Containers.Hash_Type;
17
+
15
18
private
16
19
17
20
function Hash
@@ -21,4 +24,11 @@ private
21
24
when True => Ada.Containers.Hash_Type'Mod (Item.Integer),
22
25
when False => VSS.Strings.Hash (Item.Virtual_String));
23
26
27
+ function Hash
28
+ (Item : LSP.Structures.ProgressToken)
29
+ return Ada.Containers.Hash_Type is
30
+ (case Item.Is_Integer is
31
+ when True => Ada.Containers.Hash_Type'Mod (Item.Integer),
32
+ when False => VSS.Strings.Hash (Item.Virtual_String));
33
+
24
34
end LSP.Structures.Hashes ;
Original file line number Diff line number Diff line change @@ -175,6 +175,28 @@ package body LSP.Secure_Message_Loggers is
175
175
Self.Output.New_Line (Ok);
176
176
end On_FoldingRange_Response ;
177
177
178
+ -- -----------------------------
179
+ -- On_IncomingCalls_Response --
180
+ -- -----------------------------
181
+
182
+ overriding procedure On_IncomingCalls_Response
183
+ (Self : in out Client_Response_Logger;
184
+ Id : LSP.Structures.Integer_Or_Virtual_String;
185
+ Value : LSP.Structures.CallHierarchyIncomingCall_Vector_Or_Null)
186
+ is
187
+ Ok : Boolean := True;
188
+ begin
189
+ -- Hide response, because it could be lengthly and expose names
190
+ Self.Output.Put (" 'callHierarchy/incomingCalls'" , Ok);
191
+ Self.Put_Id (Id, Ok);
192
+ Self.Output.Put (" result : len=" , Ok);
193
+
194
+ Self.Output.Put
195
+ (VSS.Strings.To_Virtual_String (Value.Length'Wide_Wide_Image), Ok);
196
+
197
+ Self.Output.New_Line (Ok);
198
+ end On_IncomingCalls_Response ;
199
+
178
200
-- --------------------------
179
201
-- On_References_Response --
180
202
-- --------------------------
Original file line number Diff line number Diff line change @@ -80,6 +80,11 @@ package LSP.Secure_Message_Loggers is
80
80
Id : LSP.Structures.Integer_Or_Virtual_String;
81
81
Value : LSP.Structures.Symbol_Result);
82
82
83
+ overriding procedure On_IncomingCalls_Response
84
+ (Self : in out Client_Response_Logger;
85
+ Id : LSP.Structures.Integer_Or_Virtual_String;
86
+ Value : LSP.Structures.CallHierarchyIncomingCall_Vector_Or_Null);
87
+
83
88
type Server_Notification_Logger is
84
89
new LSP.Server_Notification_Loggers.Server_Notification_Logger
85
90
with null record ;
You can’t perform that action at this time.
0 commit comments