Skip to content

Commit db6d049

Browse files
committed
Generate Method function of the server request for client.
1 parent 0e62581 commit db6d049

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

source/lsp_gen/lsp_gen-requests.adb

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- Language Server Protocol --
33
-- --
4-
-- Copyright (C) 2022-2023, AdaCore --
4+
-- Copyright (C) 2022-2024, AdaCore --
55
-- --
66
-- This is free software; you can redistribute it and/or modify it under --
77
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -196,9 +196,9 @@ package body LSP_Gen.Requests is
196196

197197
end Write_Loggers;
198198

199-
------------------------------
199+
-------------------------
200200
-- Write_Request_Types --
201-
------------------------------
201+
-------------------------
202202

203203
procedure Write_Request_Types
204204
(Model : LSP_Gen.Meta_Models.Meta_Model;
@@ -253,6 +253,16 @@ package body LSP_Gen.Requests is
253253
Put_Line ("_Receiver'Class);");
254254
New_Line;
255255

256+
if From = From_Client then
257+
Put_Line ("private");
258+
New_Line;
259+
260+
Put_Line ("overriding function Method (Self : Request)");
261+
Put_Line ("return VSS.Strings.Virtual_String is");
262+
Put_Line ("(""" & J & """);");
263+
New_Line;
264+
end if;
265+
256266
Put_Line ("end;");
257267
New_Line;
258268

0 commit comments

Comments
 (0)