diff --git a/gnat/lsp_client_glib.gpr b/gnat/lsp_client_glib.gpr index 3b0a9dc07..87340ebc7 100644 --- a/gnat/lsp_client_glib.gpr +++ b/gnat/lsp_client_glib.gpr @@ -16,6 +16,7 @@ ------------------------------------------------------------------------------ with "lsp"; +with "lsp_common"; with "spawn_glib"; project LSP_Client_Glib is @@ -23,6 +24,6 @@ project LSP_Client_Glib is for Source_Dirs use ("../source/client"); for Object_Dir use "../.obj/client_glib"; - package Compiler renames LSP.Compiler; + package Compiler renames LSP_Common.Compiler; end LSP_Client_Glib; diff --git a/liblsp_3_17/source/generated/lsp-server_message_factories.adb b/liblsp_3_17/source/generated/lsp-server_message_factories.adb new file mode 100644 index 000000000..c25f2bf07 --- /dev/null +++ b/liblsp_3_17/source/generated/lsp-server_message_factories.adb @@ -0,0 +1,999 @@ +-- +-- Copyright (C) , +-- +-- SPDX-License-Identifier: MIT +-- +-- DON'T EDIT THIS FILE! It was generated from metaModel.json. +-- + +with LSP.Server_Responses.Errors; +with LSP.Server_Notifications.SetTrace; +with LSP.Server_Notifications.Exits; +with LSP.Server_Notifications.Initialized; +with LSP.Server_Notifications.DidChangeNotebook; +with LSP.Server_Notifications.DidCloseNotebook; +with LSP.Server_Notifications.DidOpenNotebook; +with LSP.Server_Notifications.DidSaveNotebook; +with LSP.Server_Notifications.DidChange; +with LSP.Server_Notifications.DidClose; +with LSP.Server_Notifications.DidOpen; +with LSP.Server_Notifications.DidSave; +with LSP.Server_Notifications.WillSave; +with LSP.Server_Notifications.Cancel; +with LSP.Server_Notifications.DidChangeConfiguration; +with LSP.Server_Notifications.DidChangeWatchedFiles; +with LSP.Server_Notifications.DidChangeWorkspaceFolders; +with LSP.Server_Notifications.DidCreateFiles; +with LSP.Server_Notifications.DidDeleteFiles; +with LSP.Server_Notifications.DidRenameFiles; +with LSP.Server_Requests.AlsCheckSyntax; +with LSP.Server_Requests.IncomingCalls; +with LSP.Server_Requests.OutgoingCalls; +with LSP.Server_Requests.Code_Action_Resolve; +with LSP.Server_Requests.Code_Lens_Resolve; +with LSP.Server_Requests.Completion_Resolve; +with LSP.Server_Requests.Link_Resolve; +with LSP.Server_Requests.Initialize; +with LSP.Server_Requests.Inlay_Resolve; +with LSP.Server_Requests.Shutdown; +with LSP.Server_Requests.CodeAction; +with LSP.Server_Requests.CodeLens; +with LSP.Server_Requests.ColorPresentation; +with LSP.Server_Requests.Completion; +with LSP.Server_Requests.Declaration; +with LSP.Server_Requests.Definition; +with LSP.Server_Requests.Diagnostic; +with LSP.Server_Requests.DocumentColor; +with LSP.Server_Requests.DocumentHighlight; +with LSP.Server_Requests.DocumentLink; +with LSP.Server_Requests.DocumentSymbol; +with LSP.Server_Requests.FoldingRange; +with LSP.Server_Requests.Formatting; +with LSP.Server_Requests.Hover; +with LSP.Server_Requests.Implementation; +with LSP.Server_Requests.InlayHint; +with LSP.Server_Requests.InlineValue; +with LSP.Server_Requests.LinkedEditingRange; +with LSP.Server_Requests.Moniker; +with LSP.Server_Requests.OnTypeFormatting; +with LSP.Server_Requests.PrepareCallHierarchy; +with LSP.Server_Requests.PrepareRename; +with LSP.Server_Requests.PrepareTypeHierarchy; +with LSP.Server_Requests.RangeFormatting; +with LSP.Server_Requests.References; +with LSP.Server_Requests.Rename; +with LSP.Server_Requests.SelectionRange; +with LSP.Server_Requests.Tokens_Full; +with LSP.Server_Requests.Tokens_Delta; +with LSP.Server_Requests.Tokens_Range; +with LSP.Server_Requests.SignatureHelp; +with LSP.Server_Requests.TypeDefinition; +with LSP.Server_Requests.WillSaveWaitUntil; +with LSP.Server_Requests.Subtypes; +with LSP.Server_Requests.Supertypes; +with LSP.Server_Requests.Workspace_Diagnostic; +with LSP.Server_Requests.ExecuteCommand; +with LSP.Server_Requests.Symbol; +with LSP.Server_Requests.WillCreateFiles; +with LSP.Server_Requests.WillDeleteFiles; +with LSP.Server_Requests.WillRenameFiles; +with LSP.Server_Requests.Symbol_Resolve; +with LSP.Server_Responses.RegisterCapability; +with LSP.Server_Responses.UnregisterCapability; +with LSP.Server_Responses.ShowDocument; +with LSP.Server_Responses.ShowMessageRequest; +with LSP.Server_Responses.Progress_Create; +with LSP.Server_Responses.ApplyEdit; +with LSP.Server_Responses.Code_Lens_Refresh; +with LSP.Server_Responses.Configuration; +with LSP.Server_Responses.Diagnostic_Refresh; +with LSP.Server_Responses.Inlay_Refresh; +with LSP.Server_Responses.Inline_Refresh; +with LSP.Server_Responses.Tokens_Refresh; +with LSP.Server_Responses.WorkspaceFolders; + +package body LSP.Server_Message_Factories is + + overriding procedure On_Error_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Errors.ResponseError) is + begin + Self.Consumer.On_Message (new LSP.Server_Responses.Errors.Response' + (Id => Id, + Error => Value)); + end On_Error_Response; + + overriding procedure On_SetTrace_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.SetTraceParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.SetTrace.Notification' + (Params => Params)); + end On_SetTrace_Notification; + + overriding procedure On_Exits_Notification + (Self : in out Server_Message_Factory) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.Exits.Notification); + end On_Exits_Notification; + + overriding procedure On_Initialized_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.InitializedParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.Initialized.Notification' + (Params => Params)); + end On_Initialized_Notification; + + overriding procedure On_DidChangeNotebook_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidChangeNotebookDocumentParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.DidChangeNotebook.Notification' + (Params => Params)); + end On_DidChangeNotebook_Notification; + + overriding procedure On_DidCloseNotebook_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidCloseNotebookDocumentParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.DidCloseNotebook.Notification' + (Params => Params)); + end On_DidCloseNotebook_Notification; + + overriding procedure On_DidOpenNotebook_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidOpenNotebookDocumentParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.DidOpenNotebook.Notification' + (Params => Params)); + end On_DidOpenNotebook_Notification; + + overriding procedure On_DidSaveNotebook_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidSaveNotebookDocumentParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.DidSaveNotebook.Notification' + (Params => Params)); + end On_DidSaveNotebook_Notification; + + overriding procedure On_DidChange_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidChangeTextDocumentParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.DidChange.Notification' + (Params => Params)); + end On_DidChange_Notification; + + overriding procedure On_DidClose_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidCloseTextDocumentParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.DidClose.Notification' + (Params => Params)); + end On_DidClose_Notification; + + overriding procedure On_DidOpen_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidOpenTextDocumentParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.DidOpen.Notification'(Params => Params)); + end On_DidOpen_Notification; + + overriding procedure On_DidSave_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidSaveTextDocumentParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.DidSave.Notification'(Params => Params)); + end On_DidSave_Notification; + + overriding procedure On_WillSave_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.WillSaveTextDocumentParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.WillSave.Notification' + (Params => Params)); + end On_WillSave_Notification; + + overriding procedure On_Cancel_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.WorkDoneProgressCancelParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.Cancel.Notification'(Params => Params)); + end On_Cancel_Notification; + + overriding procedure On_DidChangeConfiguration_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidChangeConfigurationParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.DidChangeConfiguration.Notification' + (Params => Params)); + end On_DidChangeConfiguration_Notification; + + overriding procedure On_DidChangeWatchedFiles_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidChangeWatchedFilesParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.DidChangeWatchedFiles.Notification' + (Params => Params)); + end On_DidChangeWatchedFiles_Notification; + + overriding procedure On_DidChangeWorkspaceFolders_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidChangeWorkspaceFoldersParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.DidChangeWorkspaceFolders.Notification' + (Params => Params)); + end On_DidChangeWorkspaceFolders_Notification; + + overriding procedure On_DidCreateFiles_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.CreateFilesParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.DidCreateFiles.Notification' + (Params => Params)); + end On_DidCreateFiles_Notification; + + overriding procedure On_DidDeleteFiles_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DeleteFilesParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.DidDeleteFiles.Notification' + (Params => Params)); + end On_DidDeleteFiles_Notification; + + overriding procedure On_DidRenameFiles_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.RenameFilesParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Notifications.DidRenameFiles.Notification' + (Params => Params)); + end On_DidRenameFiles_Notification; + + overriding procedure On_AlsCheckSyntax_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.AlsCheckSyntaxParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.AlsCheckSyntax.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_AlsCheckSyntax_Request; + + overriding procedure On_IncomingCalls_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CallHierarchyIncomingCallsParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.IncomingCalls.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_IncomingCalls_Request; + + overriding procedure On_OutgoingCalls_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CallHierarchyOutgoingCallsParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.OutgoingCalls.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_OutgoingCalls_Request; + + overriding procedure On_RegisterCapability_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record) is + begin + Self.Consumer.On_Message + (new LSP.Server_Responses.RegisterCapability.Response' + (Id => Id, + Result => Value)); + end On_RegisterCapability_Response; + + overriding procedure On_UnregisterCapability_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record) is + begin + Self.Consumer.On_Message + (new LSP.Server_Responses.UnregisterCapability.Response' + (Id => Id, + Result => Value)); + end On_UnregisterCapability_Response; + + overriding procedure On_Code_Action_Resolve_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CodeAction) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.Code_Action_Resolve.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Code_Action_Resolve_Request; + + overriding procedure On_Code_Lens_Resolve_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CodeLens) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.Code_Lens_Resolve.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Code_Lens_Resolve_Request; + + overriding procedure On_Completion_Resolve_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CompletionItem) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.Completion_Resolve.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Completion_Resolve_Request; + + overriding procedure On_Link_Resolve_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentLink) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Link_Resolve.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Link_Resolve_Request; + + overriding procedure On_Initialize_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.InitializeParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Initialize.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Initialize_Request; + + overriding procedure On_Inlay_Resolve_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.InlayHint) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Inlay_Resolve.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Inlay_Resolve_Request; + + overriding procedure On_Shutdown_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Shutdown.Request' + (Id => Id, + Canceled => False)); + end On_Shutdown_Request; + + overriding procedure On_CodeAction_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CodeActionParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.CodeAction.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_CodeAction_Request; + + overriding procedure On_CodeLens_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CodeLensParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.CodeLens.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_CodeLens_Request; + + overriding procedure On_ColorPresentation_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.ColorPresentationParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.ColorPresentation.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_ColorPresentation_Request; + + overriding procedure On_Completion_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CompletionParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Completion.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Completion_Request; + + overriding procedure On_Declaration_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DeclarationParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Declaration.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Declaration_Request; + + overriding procedure On_Definition_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DefinitionParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Definition.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Definition_Request; + + overriding procedure On_Diagnostic_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentDiagnosticParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Diagnostic.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Diagnostic_Request; + + overriding procedure On_DocumentColor_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentColorParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.DocumentColor.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_DocumentColor_Request; + + overriding procedure On_DocumentHighlight_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentHighlightParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.DocumentHighlight.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_DocumentHighlight_Request; + + overriding procedure On_DocumentLink_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentLinkParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.DocumentLink.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_DocumentLink_Request; + + overriding procedure On_DocumentSymbol_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentSymbolParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.DocumentSymbol.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_DocumentSymbol_Request; + + overriding procedure On_FoldingRange_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.FoldingRangeParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.FoldingRange.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_FoldingRange_Request; + + overriding procedure On_Formatting_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentFormattingParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Formatting.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Formatting_Request; + + overriding procedure On_Hover_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.HoverParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Hover.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Hover_Request; + + overriding procedure On_Implementation_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.ImplementationParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Implementation.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Implementation_Request; + + overriding procedure On_InlayHint_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.InlayHintParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.InlayHint.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_InlayHint_Request; + + overriding procedure On_InlineValue_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.InlineValueParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.InlineValue.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_InlineValue_Request; + + overriding procedure On_LinkedEditingRange_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.LinkedEditingRangeParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.LinkedEditingRange.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_LinkedEditingRange_Request; + + overriding procedure On_Moniker_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.MonikerParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Moniker.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Moniker_Request; + + overriding procedure On_OnTypeFormatting_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentOnTypeFormattingParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.OnTypeFormatting.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_OnTypeFormatting_Request; + + overriding procedure On_PrepareCallHierarchy_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CallHierarchyPrepareParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.PrepareCallHierarchy.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_PrepareCallHierarchy_Request; + + overriding procedure On_PrepareRename_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.PrepareRenameParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.PrepareRename.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_PrepareRename_Request; + + overriding procedure On_PrepareTypeHierarchy_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.TypeHierarchyPrepareParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.PrepareTypeHierarchy.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_PrepareTypeHierarchy_Request; + + overriding procedure On_RangeFormatting_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentRangeFormattingParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.RangeFormatting.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_RangeFormatting_Request; + + overriding procedure On_References_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.ReferenceParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.References.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_References_Request; + + overriding procedure On_Rename_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.RenameParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Rename.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Rename_Request; + + overriding procedure On_SelectionRange_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.SelectionRangeParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.SelectionRange.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_SelectionRange_Request; + + overriding procedure On_Tokens_Full_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.SemanticTokensParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Tokens_Full.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Tokens_Full_Request; + + overriding procedure On_Tokens_Delta_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.SemanticTokensDeltaParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Tokens_Delta.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Tokens_Delta_Request; + + overriding procedure On_Tokens_Range_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.SemanticTokensRangeParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Tokens_Range.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Tokens_Range_Request; + + overriding procedure On_SignatureHelp_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.SignatureHelpParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.SignatureHelp.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_SignatureHelp_Request; + + overriding procedure On_TypeDefinition_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.TypeDefinitionParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.TypeDefinition.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_TypeDefinition_Request; + + overriding procedure On_WillSaveWaitUntil_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.WillSaveTextDocumentParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.WillSaveWaitUntil.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_WillSaveWaitUntil_Request; + + overriding procedure On_Subtypes_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.TypeHierarchySubtypesParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Subtypes.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Subtypes_Request; + + overriding procedure On_Supertypes_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.TypeHierarchySupertypesParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Supertypes.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Supertypes_Request; + + overriding procedure On_ShowDocument_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.ShowDocumentResult) is + begin + Self.Consumer.On_Message (new LSP.Server_Responses.ShowDocument.Response' + (Id => Id, + Result => Value)); + end On_ShowDocument_Response; + + overriding procedure On_ShowMessageRequest_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.MessageActionItem_Or_Null) is + begin + Self.Consumer.On_Message + (new LSP.Server_Responses.ShowMessageRequest.Response' + (Id => Id, + Result => Value)); + end On_ShowMessageRequest_Response; + + overriding procedure On_Progress_Create_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record) is + begin + Self.Consumer.On_Message + (new LSP.Server_Responses.Progress_Create.Response' + (Id => Id, + Result => Value)); + end On_Progress_Create_Response; + + overriding procedure On_ApplyEdit_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.ApplyWorkspaceEditResult) is + begin + Self.Consumer.On_Message (new LSP.Server_Responses.ApplyEdit.Response' + (Id => Id, + Result => Value)); + end On_ApplyEdit_Response; + + overriding procedure On_Code_Lens_Refresh_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record) is + begin + Self.Consumer.On_Message + (new LSP.Server_Responses.Code_Lens_Refresh.Response' + (Id => Id, + Result => Value)); + end On_Code_Lens_Refresh_Response; + + overriding procedure On_Configuration_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.LSPAny_Vector) is + begin + Self.Consumer.On_Message + (new LSP.Server_Responses.Configuration.Response' + (Id => Id, + Result => Value)); + end On_Configuration_Response; + + overriding procedure On_Workspace_Diagnostic_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.WorkspaceDiagnosticParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.Workspace_Diagnostic.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Workspace_Diagnostic_Request; + + overriding procedure On_Diagnostic_Refresh_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record) is + begin + Self.Consumer.On_Message + (new LSP.Server_Responses.Diagnostic_Refresh.Response' + (Id => Id, + Result => Value)); + end On_Diagnostic_Refresh_Response; + + overriding procedure On_ExecuteCommand_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.ExecuteCommandParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.ExecuteCommand.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_ExecuteCommand_Request; + + overriding procedure On_Inlay_Refresh_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record) is + begin + Self.Consumer.On_Message + (new LSP.Server_Responses.Inlay_Refresh.Response' + (Id => Id, + Result => Value)); + end On_Inlay_Refresh_Response; + + overriding procedure On_Inline_Refresh_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record) is + begin + Self.Consumer.On_Message + (new LSP.Server_Responses.Inline_Refresh.Response' + (Id => Id, + Result => Value)); + end On_Inline_Refresh_Response; + + overriding procedure On_Tokens_Refresh_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record) is + begin + Self.Consumer.On_Message + (new LSP.Server_Responses.Tokens_Refresh.Response' + (Id => Id, + Result => Value)); + end On_Tokens_Refresh_Response; + + overriding procedure On_Symbol_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.WorkspaceSymbolParams) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Symbol.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Symbol_Request; + + overriding procedure On_WillCreateFiles_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CreateFilesParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.WillCreateFiles.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_WillCreateFiles_Request; + + overriding procedure On_WillDeleteFiles_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DeleteFilesParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.WillDeleteFiles.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_WillDeleteFiles_Request; + + overriding procedure On_WillRenameFiles_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.RenameFilesParams) is + begin + Self.Consumer.On_Message + (new LSP.Server_Requests.WillRenameFiles.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_WillRenameFiles_Request; + + overriding procedure On_WorkspaceFolders_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.WorkspaceFolder_Vector_Or_Null) is + begin + Self.Consumer.On_Message + (new LSP.Server_Responses.WorkspaceFolders.Response' + (Id => Id, + Result => Value)); + end On_WorkspaceFolders_Response; + + overriding procedure On_Symbol_Resolve_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.WorkspaceSymbol) is + begin + Self.Consumer.On_Message (new LSP.Server_Requests.Symbol_Resolve.Request' + (Id => Id, + Params => Value, + Canceled => False)); + end On_Symbol_Resolve_Request; + +end LSP.Server_Message_Factories; diff --git a/liblsp_3_17/source/generated/lsp-server_message_factories.ads b/liblsp_3_17/source/generated/lsp-server_message_factories.ads new file mode 100644 index 000000000..eb2030714 --- /dev/null +++ b/liblsp_3_17/source/generated/lsp-server_message_factories.ads @@ -0,0 +1,430 @@ +-- +-- Copyright (C) , +-- +-- SPDX-License-Identifier: MIT +-- +-- DON'T EDIT THIS FILE! It was generated from metaModel.json. +-- + +with LSP.Server_Message_Consumers; +with LSP.Server_Message_Receivers; +with LSP.Errors; +with LSP.Structures; + +package LSP.Server_Message_Factories with + Preelaborate +is + + type Server_Message_Factory + (Consumer : not null access LSP.Server_Message_Consumers + .Server_Message_Consumer' + Class) + is + limited new LSP.Server_Message_Receivers.Server_Message_Receiver with + null record; + + overriding procedure On_Error_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Errors.ResponseError); + + overriding procedure On_SetTrace_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.SetTraceParams); + + overriding procedure On_Exits_Notification + (Self : in out Server_Message_Factory); + + overriding procedure On_Initialized_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.InitializedParams); + + overriding procedure On_DidChangeNotebook_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidChangeNotebookDocumentParams); + + overriding procedure On_DidCloseNotebook_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidCloseNotebookDocumentParams); + + overriding procedure On_DidOpenNotebook_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidOpenNotebookDocumentParams); + + overriding procedure On_DidSaveNotebook_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidSaveNotebookDocumentParams); + + overriding procedure On_DidChange_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidChangeTextDocumentParams); + + overriding procedure On_DidClose_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidCloseTextDocumentParams); + + overriding procedure On_DidOpen_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidOpenTextDocumentParams); + + overriding procedure On_DidSave_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidSaveTextDocumentParams); + + overriding procedure On_WillSave_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.WillSaveTextDocumentParams); + + overriding procedure On_Cancel_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.WorkDoneProgressCancelParams); + + overriding procedure On_DidChangeConfiguration_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidChangeConfigurationParams); + + overriding procedure On_DidChangeWatchedFiles_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidChangeWatchedFilesParams); + + overriding procedure On_DidChangeWorkspaceFolders_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DidChangeWorkspaceFoldersParams); + + overriding procedure On_DidCreateFiles_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.CreateFilesParams); + + overriding procedure On_DidDeleteFiles_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.DeleteFilesParams); + + overriding procedure On_DidRenameFiles_Notification + (Self : in out Server_Message_Factory; + Params : LSP.Structures.RenameFilesParams); + + overriding procedure On_AlsCheckSyntax_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.AlsCheckSyntaxParams); + + overriding procedure On_IncomingCalls_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CallHierarchyIncomingCallsParams); + + overriding procedure On_OutgoingCalls_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CallHierarchyOutgoingCallsParams); + + overriding procedure On_RegisterCapability_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record); + + overriding procedure On_UnregisterCapability_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record); + + overriding procedure On_Code_Action_Resolve_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CodeAction); + + overriding procedure On_Code_Lens_Resolve_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CodeLens); + + overriding procedure On_Completion_Resolve_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CompletionItem); + + overriding procedure On_Link_Resolve_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentLink); + + overriding procedure On_Initialize_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.InitializeParams); + + overriding procedure On_Inlay_Resolve_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.InlayHint); + + overriding procedure On_Shutdown_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String); + + overriding procedure On_CodeAction_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CodeActionParams); + + overriding procedure On_CodeLens_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CodeLensParams); + + overriding procedure On_ColorPresentation_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.ColorPresentationParams); + + overriding procedure On_Completion_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CompletionParams); + + overriding procedure On_Declaration_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DeclarationParams); + + overriding procedure On_Definition_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DefinitionParams); + + overriding procedure On_Diagnostic_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentDiagnosticParams); + + overriding procedure On_DocumentColor_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentColorParams); + + overriding procedure On_DocumentHighlight_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentHighlightParams); + + overriding procedure On_DocumentLink_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentLinkParams); + + overriding procedure On_DocumentSymbol_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentSymbolParams); + + overriding procedure On_FoldingRange_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.FoldingRangeParams); + + overriding procedure On_Formatting_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentFormattingParams); + + overriding procedure On_Hover_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.HoverParams); + + overriding procedure On_Implementation_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.ImplementationParams); + + overriding procedure On_InlayHint_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.InlayHintParams); + + overriding procedure On_InlineValue_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.InlineValueParams); + + overriding procedure On_LinkedEditingRange_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.LinkedEditingRangeParams); + + overriding procedure On_Moniker_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.MonikerParams); + + overriding procedure On_OnTypeFormatting_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentOnTypeFormattingParams); + + overriding procedure On_PrepareCallHierarchy_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CallHierarchyPrepareParams); + + overriding procedure On_PrepareRename_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.PrepareRenameParams); + + overriding procedure On_PrepareTypeHierarchy_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.TypeHierarchyPrepareParams); + + overriding procedure On_RangeFormatting_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DocumentRangeFormattingParams); + + overriding procedure On_References_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.ReferenceParams); + + overriding procedure On_Rename_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.RenameParams); + + overriding procedure On_SelectionRange_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.SelectionRangeParams); + + overriding procedure On_Tokens_Full_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.SemanticTokensParams); + + overriding procedure On_Tokens_Delta_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.SemanticTokensDeltaParams); + + overriding procedure On_Tokens_Range_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.SemanticTokensRangeParams); + + overriding procedure On_SignatureHelp_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.SignatureHelpParams); + + overriding procedure On_TypeDefinition_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.TypeDefinitionParams); + + overriding procedure On_WillSaveWaitUntil_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.WillSaveTextDocumentParams); + + overriding procedure On_Subtypes_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.TypeHierarchySubtypesParams); + + overriding procedure On_Supertypes_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.TypeHierarchySupertypesParams); + + overriding procedure On_ShowDocument_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.ShowDocumentResult); + + overriding procedure On_ShowMessageRequest_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.MessageActionItem_Or_Null); + + overriding procedure On_Progress_Create_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record); + + overriding procedure On_ApplyEdit_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.ApplyWorkspaceEditResult); + + overriding procedure On_Code_Lens_Refresh_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record); + + overriding procedure On_Configuration_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.LSPAny_Vector); + + overriding procedure On_Workspace_Diagnostic_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.WorkspaceDiagnosticParams); + + overriding procedure On_Diagnostic_Refresh_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record); + + overriding procedure On_ExecuteCommand_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.ExecuteCommandParams); + + overriding procedure On_Inlay_Refresh_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record); + + overriding procedure On_Inline_Refresh_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record); + + overriding procedure On_Tokens_Refresh_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.Null_Record); + + overriding procedure On_Symbol_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.WorkspaceSymbolParams); + + overriding procedure On_WillCreateFiles_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.CreateFilesParams); + + overriding procedure On_WillDeleteFiles_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.DeleteFilesParams); + + overriding procedure On_WillRenameFiles_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.RenameFilesParams); + + overriding procedure On_WorkspaceFolders_Response + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.WorkspaceFolder_Vector_Or_Null); + + overriding procedure On_Symbol_Resolve_Request + (Self : in out Server_Message_Factory; + Id : LSP.Structures.Integer_Or_Virtual_String; + Value : LSP.Structures.WorkspaceSymbol); + +end LSP.Server_Message_Factories; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-alschecksyntax.ads b/liblsp_3_17/source/generated/lsp-server_requests-alschecksyntax.ads index 545c09875..dfeb5d1e8 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-alschecksyntax.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-alschecksyntax.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.AlsCheckSyntax is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("$/alsCheckSyntax"); + end LSP.Server_Requests.AlsCheckSyntax; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-code_action_resolve.ads b/liblsp_3_17/source/generated/lsp-server_requests-code_action_resolve.ads index c494ee3ea..7f6545ea2 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-code_action_resolve.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-code_action_resolve.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Code_Action_Resolve is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("codeAction/resolve"); + end LSP.Server_Requests.Code_Action_Resolve; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-code_lens_resolve.ads b/liblsp_3_17/source/generated/lsp-server_requests-code_lens_resolve.ads index 629516cd4..4b773d1ad 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-code_lens_resolve.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-code_lens_resolve.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Code_Lens_Resolve is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("codeLens/resolve"); + end LSP.Server_Requests.Code_Lens_Resolve; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-codeaction.ads b/liblsp_3_17/source/generated/lsp-server_requests-codeaction.ads index 5f2f3e6b0..fc5d95408 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-codeaction.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-codeaction.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.CodeAction is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/codeAction"); + end LSP.Server_Requests.CodeAction; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-codelens.ads b/liblsp_3_17/source/generated/lsp-server_requests-codelens.ads index 52cb55778..fda1f2aa4 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-codelens.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-codelens.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.CodeLens is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/codeLens"); + end LSP.Server_Requests.CodeLens; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-colorpresentation.ads b/liblsp_3_17/source/generated/lsp-server_requests-colorpresentation.ads index 34b2f6933..afcba66bf 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-colorpresentation.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-colorpresentation.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.ColorPresentation is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/colorPresentation"); + end LSP.Server_Requests.ColorPresentation; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-completion.ads b/liblsp_3_17/source/generated/lsp-server_requests-completion.ads index 5d1771713..37be7bb6f 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-completion.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-completion.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Completion is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/completion"); + end LSP.Server_Requests.Completion; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-completion_resolve.ads b/liblsp_3_17/source/generated/lsp-server_requests-completion_resolve.ads index 3921f4545..72f28e525 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-completion_resolve.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-completion_resolve.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Completion_Resolve is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("completionItem/resolve"); + end LSP.Server_Requests.Completion_Resolve; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-declaration.ads b/liblsp_3_17/source/generated/lsp-server_requests-declaration.ads index f03d7ea3b..87a764f30 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-declaration.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-declaration.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Declaration is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/declaration"); + end LSP.Server_Requests.Declaration; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-definition.ads b/liblsp_3_17/source/generated/lsp-server_requests-definition.ads index 34ad1215b..8e89fc483 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-definition.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-definition.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Definition is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/definition"); + end LSP.Server_Requests.Definition; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-diagnostic.ads b/liblsp_3_17/source/generated/lsp-server_requests-diagnostic.ads index 214a95a7c..768603d31 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-diagnostic.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-diagnostic.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Diagnostic is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/diagnostic"); + end LSP.Server_Requests.Diagnostic; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-documentcolor.ads b/liblsp_3_17/source/generated/lsp-server_requests-documentcolor.ads index eac7c5c0a..51ca66395 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-documentcolor.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-documentcolor.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.DocumentColor is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/documentColor"); + end LSP.Server_Requests.DocumentColor; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-documenthighlight.ads b/liblsp_3_17/source/generated/lsp-server_requests-documenthighlight.ads index 624f08cd4..3ee87ce3f 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-documenthighlight.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-documenthighlight.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.DocumentHighlight is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/documentHighlight"); + end LSP.Server_Requests.DocumentHighlight; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-documentlink.ads b/liblsp_3_17/source/generated/lsp-server_requests-documentlink.ads index 63e98449c..5e13d846f 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-documentlink.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-documentlink.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.DocumentLink is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/documentLink"); + end LSP.Server_Requests.DocumentLink; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-documentsymbol.ads b/liblsp_3_17/source/generated/lsp-server_requests-documentsymbol.ads index 54c288ac3..7203a3bdb 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-documentsymbol.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-documentsymbol.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.DocumentSymbol is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/documentSymbol"); + end LSP.Server_Requests.DocumentSymbol; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-executecommand.ads b/liblsp_3_17/source/generated/lsp-server_requests-executecommand.ads index bd9bc3b29..096b482cd 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-executecommand.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-executecommand.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.ExecuteCommand is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("workspace/executeCommand"); + end LSP.Server_Requests.ExecuteCommand; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-foldingrange.ads b/liblsp_3_17/source/generated/lsp-server_requests-foldingrange.ads index 93c486615..ee63e331a 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-foldingrange.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-foldingrange.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.FoldingRange is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/foldingRange"); + end LSP.Server_Requests.FoldingRange; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-formatting.ads b/liblsp_3_17/source/generated/lsp-server_requests-formatting.ads index eab45a83b..caf750ce3 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-formatting.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-formatting.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Formatting is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/formatting"); + end LSP.Server_Requests.Formatting; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-hover.ads b/liblsp_3_17/source/generated/lsp-server_requests-hover.ads index cba6db010..79308c57f 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-hover.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-hover.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Hover is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/hover"); + end LSP.Server_Requests.Hover; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-implementation.ads b/liblsp_3_17/source/generated/lsp-server_requests-implementation.ads index a0bb8a990..ba60c9236 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-implementation.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-implementation.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Implementation is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/implementation"); + end LSP.Server_Requests.Implementation; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-incomingcalls.ads b/liblsp_3_17/source/generated/lsp-server_requests-incomingcalls.ads index c579d50c7..5ce2ee620 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-incomingcalls.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-incomingcalls.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.IncomingCalls is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("callHierarchy/incomingCalls"); + end LSP.Server_Requests.IncomingCalls; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-initialize.ads b/liblsp_3_17/source/generated/lsp-server_requests-initialize.ads index 569c39564..ff062415a 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-initialize.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-initialize.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Initialize is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("initialize"); + end LSP.Server_Requests.Initialize; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-inlay_resolve.ads b/liblsp_3_17/source/generated/lsp-server_requests-inlay_resolve.ads index 56dc55d19..a66d1562f 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-inlay_resolve.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-inlay_resolve.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Inlay_Resolve is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("inlayHint/resolve"); + end LSP.Server_Requests.Inlay_Resolve; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-inlayhint.ads b/liblsp_3_17/source/generated/lsp-server_requests-inlayhint.ads index a49afb8a6..dc36afc4b 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-inlayhint.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-inlayhint.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.InlayHint is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/inlayHint"); + end LSP.Server_Requests.InlayHint; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-inlinevalue.ads b/liblsp_3_17/source/generated/lsp-server_requests-inlinevalue.ads index b13e46de7..0614116ec 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-inlinevalue.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-inlinevalue.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.InlineValue is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/inlineValue"); + end LSP.Server_Requests.InlineValue; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-link_resolve.ads b/liblsp_3_17/source/generated/lsp-server_requests-link_resolve.ads index b0356c313..2d3318854 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-link_resolve.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-link_resolve.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Link_Resolve is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("documentLink/resolve"); + end LSP.Server_Requests.Link_Resolve; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-linkededitingrange.ads b/liblsp_3_17/source/generated/lsp-server_requests-linkededitingrange.ads index 94fb2509a..3dd367681 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-linkededitingrange.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-linkededitingrange.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.LinkedEditingRange is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/linkedEditingRange"); + end LSP.Server_Requests.LinkedEditingRange; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-moniker.ads b/liblsp_3_17/source/generated/lsp-server_requests-moniker.ads index 70f85e7da..6ba17c4c5 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-moniker.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-moniker.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Moniker is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/moniker"); + end LSP.Server_Requests.Moniker; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-ontypeformatting.ads b/liblsp_3_17/source/generated/lsp-server_requests-ontypeformatting.ads index f3a55fce3..831b24198 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-ontypeformatting.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-ontypeformatting.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.OnTypeFormatting is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/onTypeFormatting"); + end LSP.Server_Requests.OnTypeFormatting; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-outgoingcalls.ads b/liblsp_3_17/source/generated/lsp-server_requests-outgoingcalls.ads index 655aa946d..38643fb37 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-outgoingcalls.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-outgoingcalls.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.OutgoingCalls is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("callHierarchy/outgoingCalls"); + end LSP.Server_Requests.OutgoingCalls; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-preparecallhierarchy.ads b/liblsp_3_17/source/generated/lsp-server_requests-preparecallhierarchy.ads index 954458f65..7dfcbdddd 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-preparecallhierarchy.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-preparecallhierarchy.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.PrepareCallHierarchy is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/prepareCallHierarchy"); + end LSP.Server_Requests.PrepareCallHierarchy; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-preparerename.ads b/liblsp_3_17/source/generated/lsp-server_requests-preparerename.ads index 9572c4a61..1db019b9f 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-preparerename.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-preparerename.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.PrepareRename is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/prepareRename"); + end LSP.Server_Requests.PrepareRename; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-preparetypehierarchy.ads b/liblsp_3_17/source/generated/lsp-server_requests-preparetypehierarchy.ads index ab22eb752..62608a85b 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-preparetypehierarchy.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-preparetypehierarchy.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.PrepareTypeHierarchy is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/prepareTypeHierarchy"); + end LSP.Server_Requests.PrepareTypeHierarchy; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-rangeformatting.ads b/liblsp_3_17/source/generated/lsp-server_requests-rangeformatting.ads index 6ccb57dc0..87a1c1cb9 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-rangeformatting.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-rangeformatting.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.RangeFormatting is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/rangeFormatting"); + end LSP.Server_Requests.RangeFormatting; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-references.ads b/liblsp_3_17/source/generated/lsp-server_requests-references.ads index 7392e9cc2..aa9ede2ba 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-references.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-references.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.References is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/references"); + end LSP.Server_Requests.References; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-rename.ads b/liblsp_3_17/source/generated/lsp-server_requests-rename.ads index 40fee7e3b..6e7660e7a 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-rename.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-rename.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Rename is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/rename"); + end LSP.Server_Requests.Rename; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-selectionrange.ads b/liblsp_3_17/source/generated/lsp-server_requests-selectionrange.ads index a42b9e749..db5aeae07 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-selectionrange.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-selectionrange.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.SelectionRange is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/selectionRange"); + end LSP.Server_Requests.SelectionRange; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-shutdown.ads b/liblsp_3_17/source/generated/lsp-server_requests-shutdown.ads index eb519ac79..9ddab1889 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-shutdown.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-shutdown.ads @@ -18,4 +18,10 @@ package LSP.Server_Requests.Shutdown is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("shutdown"); + end LSP.Server_Requests.Shutdown; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-signaturehelp.ads b/liblsp_3_17/source/generated/lsp-server_requests-signaturehelp.ads index 9427923ff..94105c0e3 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-signaturehelp.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-signaturehelp.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.SignatureHelp is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/signatureHelp"); + end LSP.Server_Requests.SignatureHelp; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-subtypes.ads b/liblsp_3_17/source/generated/lsp-server_requests-subtypes.ads index 03c9cd5a8..288d7898a 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-subtypes.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-subtypes.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Subtypes is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("typeHierarchy/subtypes"); + end LSP.Server_Requests.Subtypes; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-supertypes.ads b/liblsp_3_17/source/generated/lsp-server_requests-supertypes.ads index 4a90a7698..2c99c9f9c 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-supertypes.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-supertypes.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Supertypes is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("typeHierarchy/supertypes"); + end LSP.Server_Requests.Supertypes; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-symbol.ads b/liblsp_3_17/source/generated/lsp-server_requests-symbol.ads index a27061e27..8ed7492c4 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-symbol.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-symbol.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Symbol is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("workspace/symbol"); + end LSP.Server_Requests.Symbol; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-symbol_resolve.ads b/liblsp_3_17/source/generated/lsp-server_requests-symbol_resolve.ads index 03e3493e7..4e580b4ae 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-symbol_resolve.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-symbol_resolve.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Symbol_Resolve is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("workspaceSymbol/resolve"); + end LSP.Server_Requests.Symbol_Resolve; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-tokens_delta.ads b/liblsp_3_17/source/generated/lsp-server_requests-tokens_delta.ads index a7a911d05..e07fe5b3a 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-tokens_delta.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-tokens_delta.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Tokens_Delta is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/semanticTokens/full/delta"); + end LSP.Server_Requests.Tokens_Delta; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-tokens_full.ads b/liblsp_3_17/source/generated/lsp-server_requests-tokens_full.ads index b79f49f71..c60364b96 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-tokens_full.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-tokens_full.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Tokens_Full is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/semanticTokens/full"); + end LSP.Server_Requests.Tokens_Full; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-tokens_range.ads b/liblsp_3_17/source/generated/lsp-server_requests-tokens_range.ads index ced933cee..ed08a8767 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-tokens_range.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-tokens_range.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Tokens_Range is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/semanticTokens/range"); + end LSP.Server_Requests.Tokens_Range; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-typedefinition.ads b/liblsp_3_17/source/generated/lsp-server_requests-typedefinition.ads index e7a92a981..1f9cb793d 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-typedefinition.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-typedefinition.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.TypeDefinition is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/typeDefinition"); + end LSP.Server_Requests.TypeDefinition; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-willcreatefiles.ads b/liblsp_3_17/source/generated/lsp-server_requests-willcreatefiles.ads index b49051f76..f45d8fd08 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-willcreatefiles.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-willcreatefiles.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.WillCreateFiles is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("workspace/willCreateFiles"); + end LSP.Server_Requests.WillCreateFiles; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-willdeletefiles.ads b/liblsp_3_17/source/generated/lsp-server_requests-willdeletefiles.ads index a701e1068..86153e58c 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-willdeletefiles.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-willdeletefiles.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.WillDeleteFiles is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("workspace/willDeleteFiles"); + end LSP.Server_Requests.WillDeleteFiles; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-willrenamefiles.ads b/liblsp_3_17/source/generated/lsp-server_requests-willrenamefiles.ads index 543c600b0..7054f860c 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-willrenamefiles.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-willrenamefiles.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.WillRenameFiles is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("workspace/willRenameFiles"); + end LSP.Server_Requests.WillRenameFiles; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-willsavewaituntil.ads b/liblsp_3_17/source/generated/lsp-server_requests-willsavewaituntil.ads index a585936c7..4cedb3d8d 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-willsavewaituntil.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-willsavewaituntil.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.WillSaveWaitUntil is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("textDocument/willSaveWaitUntil"); + end LSP.Server_Requests.WillSaveWaitUntil; diff --git a/liblsp_3_17/source/generated/lsp-server_requests-workspace_diagnostic.ads b/liblsp_3_17/source/generated/lsp-server_requests-workspace_diagnostic.ads index 3888054f4..7d5e67b5c 100644 --- a/liblsp_3_17/source/generated/lsp-server_requests-workspace_diagnostic.ads +++ b/liblsp_3_17/source/generated/lsp-server_requests-workspace_diagnostic.ads @@ -20,4 +20,10 @@ package LSP.Server_Requests.Workspace_Diagnostic is Value : in out LSP.Server_Request_Receivers.Server_Request_Receiver' Class); +private + + overriding function Method + (Self : Request) return VSS.Strings.Virtual_String is + ("workspace/diagnostic"); + end LSP.Server_Requests.Workspace_Diagnostic; diff --git a/liblsp_3_17/source/lsp-server_message_consumers.ads b/liblsp_3_17/source/lsp-server_message_consumers.ads new file mode 100644 index 000000000..6a903a00c --- /dev/null +++ b/liblsp_3_17/source/lsp-server_message_consumers.ads @@ -0,0 +1,25 @@ +-- +-- Copyright (C) 2024, AdaCore +-- +-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +-- + +-- Consumer interface to process client->server messages created by the +-- Server_Message_Factory. + +with LSP.Server_Messages; + +package LSP.Server_Message_Consumers + with Preelaborate +is + + type Server_Message_Consumer is limited interface; + + not overriding procedure On_Message + (Self : in out Server_Message_Consumer; + Message : not null LSP.Server_Messages.Server_Message_Access) + is abstract; + -- Process message. Implementation is responsible to release memory + -- occupied by message. + +end LSP.Server_Message_Consumers; diff --git a/liblsp_3_17/source/lsp-server_message_receivers.ads b/liblsp_3_17/source/lsp-server_message_receivers.ads new file mode 100644 index 000000000..654b33924 --- /dev/null +++ b/liblsp_3_17/source/lsp-server_message_receivers.ads @@ -0,0 +1,19 @@ +-- +-- Copyright (C) 2024, AdaCore +-- +-- SPDX-License-Identifier: Apache-2.0 +-- + +with LSP.Server_Notification_Receivers; +with LSP.Server_Request_Receivers; +with LSP.Server_Response_Receivers; + +package LSP.Server_Message_Receivers is + pragma Preelaborate; + + type Server_Message_Receiver is limited interface + and LSP.Server_Notification_Receivers.Server_Notification_Receiver + and LSP.Server_Request_Receivers.Server_Request_Receiver + and LSP.Server_Response_Receivers.Server_Response_Receiver; + +end LSP.Server_Message_Receivers; diff --git a/liblsp_3_17/source/lsp-server_requests.ads b/liblsp_3_17/source/lsp-server_requests.ads index 124a08d34..f2c4785f6 100644 --- a/liblsp_3_17/source/lsp-server_requests.ads +++ b/liblsp_3_17/source/lsp-server_requests.ads @@ -9,13 +9,15 @@ with LSP.Server_Messages; with LSP.Server_Request_Receivers; with LSP.Structures; +with VSS.Strings; + package LSP.Server_Requests is pragma Preelaborate; type Server_Request is abstract limited new LSP.Server_Messages.Server_Message with record - Id : LSP.Structures.Integer_Or_Virtual_String; + Id : LSP.Structures.Integer_Or_Virtual_String; Canceled : Boolean := False with Atomic; @@ -23,11 +25,14 @@ package LSP.Server_Requests is -- task end record; + function Method + (Self : Server_Request) return VSS.Strings.Virtual_String is abstract; + -- Returns name of the method. + procedure Visit_Server_Receiver (Self : Server_Request; - Value : in out LSP.Server_Request_Receivers - .Server_Request_Receiver'Class) - is abstract; + Value : in out + LSP.Server_Request_Receivers.Server_Request_Receiver'Class) is abstract; overriding procedure Visit_Server_Message_Visitor (Self : Server_Request; diff --git a/liblsp_3_17/source/lsp-server_responses-errors.adb b/liblsp_3_17/source/lsp-server_responses-errors.adb new file mode 100644 index 000000000..14ea5bb73 --- /dev/null +++ b/liblsp_3_17/source/lsp-server_responses-errors.adb @@ -0,0 +1,20 @@ +-- +-- Copyright (C) 2024, AdaCore +-- +-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +-- +package body LSP.Server_Responses.Errors is + + --------------------------- + -- Visit_Server_Receiver -- + --------------------------- + + overriding procedure Visit_Server_Receiver + (Self : Response; + Value : in out + LSP.Server_Response_Receivers.Server_Response_Receiver'Class) is + begin + Value.On_Error_Response (Self.Id, Self.Error); + end Visit_Server_Receiver; + +end LSP.Server_Responses.Errors; diff --git a/liblsp_3_17/source/lsp-server_responses-errors.ads b/liblsp_3_17/source/lsp-server_responses-errors.ads new file mode 100644 index 000000000..c6f2f5cb8 --- /dev/null +++ b/liblsp_3_17/source/lsp-server_responses-errors.ads @@ -0,0 +1,20 @@ +-- +-- Copyright (C) 2024, AdaCore +-- +-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +-- + +package LSP.Server_Responses.Errors + with Preelaborate +is + + type Response is new LSP.Server_Responses.Server_Response with record + Error : LSP.Errors.ResponseError; + end record; + + overriding procedure Visit_Server_Receiver + (Self : Response; + Value : in out + LSP.Server_Response_Receivers.Server_Response_Receiver'Class); + +end LSP.Server_Responses.Errors; diff --git a/liblsp_3_17/source/lsp-structures-hashes.ads b/liblsp_3_17/source/lsp-structures-hashes.ads new file mode 100644 index 000000000..24c76b0e7 --- /dev/null +++ b/liblsp_3_17/source/lsp-structures-hashes.ads @@ -0,0 +1,24 @@ +-- +-- Copyright (C) 2024, AdaCore +-- +-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +-- + +private with VSS.Strings.Hash; + +package LSP.Structures.Hashes is + + function Hash + (Item : LSP.Structures.Integer_Or_Virtual_String) + return Ada.Containers.Hash_Type; + +private + + function Hash + (Item : LSP.Structures.Integer_Or_Virtual_String) + return Ada.Containers.Hash_Type is + (case Item.Is_Integer is + when True => Ada.Containers.Hash_Type'Mod (Item.Integer), + when False => VSS.Strings.Hash (Item.Virtual_String)); + +end LSP.Structures.Hashes; diff --git a/liblsp_3_16/source/lsp-json_streams.adb b/liblsp_base/source/lsp-json_streams.adb similarity index 100% rename from liblsp_3_16/source/lsp-json_streams.adb rename to liblsp_base/source/lsp-json_streams.adb diff --git a/liblsp_3_16/source/lsp-json_streams.ads b/liblsp_base/source/lsp-json_streams.ads similarity index 100% rename from liblsp_3_16/source/lsp-json_streams.ads rename to liblsp_base/source/lsp-json_streams.ads diff --git a/source/lsp_gen/Makefile b/source/lsp_gen/Makefile index 9bc380f0e..cf597858a 100644 --- a/source/lsp_gen/Makefile +++ b/source/lsp_gen/Makefile @@ -10,7 +10,7 @@ GEN_JSON_DIR = ./generated LSP_GEN_PRJ = -P ../../gnat/lsp_gen.gpr DOC = ../../doc TEMP_FILE ?= /tmp/sources.ada -LSP317_DIR = ../lsp_3.17/generated +LSP317_DIR = ../../liblsp_3_17/source/generated LSP317_PRJ = -P ../../gnat/lsp_3_17.gpr LSP_GEN = ../../.obj/${SUPERPROJECT}/lsp_gen/lsp_gen-run diff --git a/source/lsp_gen/lsp_gen-factories.adb b/source/lsp_gen/lsp_gen-factories.adb index 128be6de8..538a0926b 100644 --- a/source/lsp_gen/lsp_gen-factories.adb +++ b/source/lsp_gen/lsp_gen-factories.adb @@ -1,7 +1,7 @@ ------------------------------------------------------------------------------ -- Language Server Protocol -- -- -- --- Copyright (C) 2018-2023, AdaCore -- +-- Copyright (C) 2018-2024, AdaCore -- -- -- -- This is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,11 +29,31 @@ package body LSP_Gen.Factories is Work_Done_List : VSS.String_Vectors.Virtual_String_Vector renames LSP_Gen.Dependencies.Work_Done_List; + procedure Write_Client_Factories + (Model : LSP_Gen.Meta_Models.Meta_Model; + Done : LSP_Gen.Dependencies.Dependency_Map); + + procedure Write_Server_Factories + (Model : LSP_Gen.Meta_Models.Meta_Model; + Done : LSP_Gen.Dependencies.Dependency_Map); + ----------- -- Write -- ----------- procedure Write + (Model : LSP_Gen.Meta_Models.Meta_Model; + Done : LSP_Gen.Dependencies.Dependency_Map) is + begin + Write_Client_Factories (Model, Done); + Write_Server_Factories (Model, Done); + end Write; + + ---------------------------- + -- Write_Client_Factories -- + ---------------------------- + + procedure Write_Client_Factories (Model : LSP_Gen.Meta_Models.Meta_Model; Done : LSP_Gen.Dependencies.Dependency_Map) is @@ -351,6 +371,240 @@ package body LSP_Gen.Factories is Put_Line ("end;"); New_Line; - end Write; + end Write_Client_Factories; + + ---------------------------- + -- Write_Server_Factories -- + ---------------------------- + + procedure Write_Server_Factories + (Model : LSP_Gen.Meta_Models.Meta_Model; + Done : LSP_Gen.Dependencies.Dependency_Map) + is + use all type LSP_Gen.Configurations.Message_Direction; + use type VSS.Strings.Virtual_String; + + Name : constant VSS.Strings.Virtual_String := "Server_Message_Factory"; + + begin + Put_Lines (Model.License_Header, "-- "); + New_Line; + Put_Line ("with LSP.Server_Message_Consumers;"); + Put_Line ("with LSP.Server_Message_Receivers;"); + Put_Line ("with LSP.Errors;"); + Put_Line ("with LSP.Structures;"); + + New_Line; + + Put_Line ("package LSP.Server_Message_Factories"); + Put_Line (" with Preelaborate"); + Put_Line ("is"); + New_Line; + Put_Line ("type " & Name & " (Consumer : not null access"); + Put_Line ("LSP.Server_Message_Consumers.Server_Message_Consumer'Class)"); + Put_Line (" is limited new"); + Put_Line ("LSP.Server_Message_Receivers.Server_Message_Receiver "); + Put_Line ("with null record;"); + New_Line; + + Put_Line ("overriding procedure On_Error_Response"); + Put_Line ("(Self : in out Server_Message_Factory;"); + Put_Line ("Id : LSP.Structures.Integer_Or_Virtual_String;"); + Put_Line ("Value : LSP.Errors.ResponseError);"); + New_Line; + + for J of Model.Notifications loop + if Model.Message_Direction (J) = From_Client then + Put ("overriding procedure On_"); + Put (Model.Message_Name (J)); + Put_Line ("_Notification"); + Put ("(Self : in out "); + Put (Name); + + if Model.Notification (J).params.Is_Set then + Put_Line (";"); + Put ("Params : LSP.Structures."); + Put (Model.Notification (J).params.Value.Union.reference.name); + end if; + + Put_Line (");"); + New_Line; + end if; + end loop; + + for J of Model.Requests loop + case Model.Message_Direction (J) is + when From_Client => + Put ("overriding procedure On_"); + Put (Model.Message_Name (J)); + Put_Line ("_Request"); + Put ("(Self : in out "); + Put (Name); + Put_Line (";"); + Put_Line ("Id : LSP.Structures.Integer_Or_Virtual_String"); + + if Model.Request (J).params.Is_Set then + Put_Line (";"); + Put ("Value : LSP.Structures."); + Put (LSP_Gen.Requests.Param_Type (Model, J)); + end if; + + Put_Line (");"); + New_Line; + + when From_Server => + Put ("overriding procedure On_"); + Put (Model.Message_Name (J)); + Put_Line ("_Response"); + Put ("(Self : in out "); + Put (Name); + Put_Line (";"); + Put_Line ("Id : LSP.Structures.Integer_Or_Virtual_String;"); + Put ("Value : LSP.Structures."); + Put (LSP_Gen.Responses.Result_Type (Model, Done, J)); + Put_Line (");"); + New_Line; + + when others => + raise Program_Error; + end case; + end loop; + + Put_Line ("end LSP.Server_Message_Factories;"); + New_Line; + + Put_Lines (Model.License_Header, "-- "); + New_Line; + Put_Line ("with LSP.Server_Responses.Errors;"); + + for J of Model.Notifications loop + if Model.Message_Direction (J) = From_Client then + Put ("with LSP.Server_Notifications."); + Put (Model.Message_Name (J)); + Put_Line (";"); + end if; + end loop; + + for J of Model.Requests loop + if Model.Message_Direction (J) = From_Client then + Put ("with LSP.Server_Requests."); + Put (Model.Message_Name (J)); + Put_Line (";"); + end if; + end loop; + + for J of Model.Requests loop + if Model.Message_Direction (J) = From_Server then + Put ("with LSP.Server_Responses."); + Put (Model.Message_Name (J)); + Put_Line (";"); + end if; + end loop; + + New_Line; + Put_Line ("package body LSP.Server_Message_Factories is"); + New_Line; + Put_Line ("overriding procedure On_Error_Response"); + Put_Line ("(Self : in out Server_Message_Factory;"); + Put_Line ("Id : LSP.Structures.Integer_Or_Virtual_String;"); + Put_Line ("Value : LSP.Errors.ResponseError) is"); + Put_Line ("begin"); + Put_Line ("Self.Consumer.On_Message"); + Put_Line ("(new LSP.Server_Responses.Errors.Response'"); + Put_Line ("(Id => Id, Error => Value));"); + Put_Line ("end;"); + New_Line; + + for J of Model.Notifications loop + if Model.Message_Direction (J) = From_Client then + Put ("overriding procedure On_"); + Put (Model.Message_Name (J)); + Put_Line ("_Notification"); + Put ("(Self : in out "); + Put (Name); + + if Model.Notification (J).params.Is_Set then + Put_Line (";"); + Put ("Params : LSP.Structures."); + Put (Model.Notification (J).params.Value.Union.reference.name); + end if; + + Put_Line (") is"); + Put_Line ("begin"); + Put_Line ("Self.Consumer.On_Message"); + Put ("(new LSP.Server_Notifications."); + Put (Model.Message_Name (J)); + Put_Line (".Notification"); + if Model.Notification (J).params.Is_Set then + Put_Line ("'(Params => Params)"); + end if; + Put_Line (");"); + Put_Line ("end;"); + New_Line; + end if; + end loop; + + for J of Model.Requests loop + case Model.Message_Direction (J) is + when From_Client => + Put ("overriding procedure On_"); + Put (Model.Message_Name (J)); + Put_Line ("_Request"); + Put ("(Self : in out "); + Put (Name); + Put_Line (";"); + Put_Line ("Id : LSP.Structures.Integer_Or_Virtual_String"); + + if Model.Request (J).params.Is_Set then + Put_Line (";"); + Put ("Value : LSP.Structures."); + Put (LSP_Gen.Requests.Param_Type (Model, J)); + end if; + + Put_Line (") is"); + Put_Line ("begin"); + Put_Line ("Self.Consumer.On_Message"); + Put ("(new LSP.Server_Requests."); + Put (Model.Message_Name (J)); + Put_Line (".Request'"); + Put ("(Id => Id"); + + if Model.Request (J).params.Is_Set then + Put (", Params => Value"); + end if; + + Put (", Canceled => False"); + Put_Line ("));"); + Put_Line ("end;"); + New_Line; + + when From_Server => + Put ("overriding procedure On_"); + Put (Model.Message_Name (J)); + Put_Line ("_Response"); + Put ("(Self : in out "); + Put (Name); + Put_Line (";"); + Put_Line ("Id : LSP.Structures.Integer_Or_Virtual_String;"); + Put ("Value : LSP.Structures."); + Put (LSP_Gen.Responses.Result_Type (Model, Done, J)); + Put_Line (") is"); + Put_Line ("begin"); + Put_Line ("Self.Consumer.On_Message"); + Put ("(new LSP.Server_Responses."); + Put (Model.Message_Name (J)); + Put_Line (".Response'"); + Put_Line ("(Id => Id, Result => Value));"); + Put_Line ("end;"); + New_Line; + + when others => + raise Program_Error; + end case; + end loop; + + Put_Line ("end LSP.Server_Message_Factories;"); + New_Line; + end Write_Server_Factories; end LSP_Gen.Factories; diff --git a/source/lsp_gen/lsp_gen-requests.adb b/source/lsp_gen/lsp_gen-requests.adb index 24be81095..25fffdc4b 100644 --- a/source/lsp_gen/lsp_gen-requests.adb +++ b/source/lsp_gen/lsp_gen-requests.adb @@ -1,7 +1,7 @@ ------------------------------------------------------------------------------ -- Language Server Protocol -- -- -- --- Copyright (C) 2022-2023, AdaCore -- +-- Copyright (C) 2022-2024, AdaCore -- -- -- -- This is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -196,9 +196,9 @@ package body LSP_Gen.Requests is end Write_Loggers; - ------------------------------ + ------------------------- -- Write_Request_Types -- - ------------------------------ + ------------------------- procedure Write_Request_Types (Model : LSP_Gen.Meta_Models.Meta_Model; @@ -253,6 +253,16 @@ package body LSP_Gen.Requests is Put_Line ("_Receiver'Class);"); New_Line; + if From = From_Client then + Put_Line ("private"); + New_Line; + + Put_Line ("overriding function Method (Self : Request)"); + Put_Line ("return VSS.Strings.Virtual_String is"); + Put_Line ("(""" & J & """);"); + New_Line; + end if; + Put_Line ("end;"); New_Line; diff --git a/source/server/lsp-known_requests.adb b/source/server/lsp-known_requests.adb index 296756dff..44f3f73e0 100644 --- a/source/server/lsp-known_requests.adb +++ b/source/server/lsp-known_requests.adb @@ -1,7 +1,7 @@ ------------------------------------------------------------------------------ -- Language Server Protocol -- -- -- --- Copyright (C) 2022-2023, AdaCore -- +-- Copyright (C) 2022-2024, AdaCore -- -- -- -- This is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -17,6 +17,9 @@ with Ada.Unchecked_Conversion; +with LSP.Server_Notifications; +with LSP.Server_Requests; + package body LSP.Known_Requests is type Request_Constant_Access is diff --git a/source/server/lsp-known_requests.ads b/source/server/lsp-known_requests.ads index 68c7c9197..afdd910c1 100644 --- a/source/server/lsp-known_requests.ads +++ b/source/server/lsp-known_requests.ads @@ -1,7 +1,7 @@ ------------------------------------------------------------------------------ -- Language Server Protocol -- -- -- --- Copyright (C) 2022-2023, AdaCore -- +-- Copyright (C) 2022-2024, AdaCore -- -- -- -- This is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -15,16 +15,14 @@ -- of the license. -- ------------------------------------------------------------------------------ -with Ada.Containers.Hashed_Maps; +private with Ada.Containers.Hashed_Maps; -with VSS.Strings.Hash; - -with LSP.Server_Message_Visitors; +private with LSP.Server_Message_Visitors; with LSP.Server_Messages; -with LSP.Server_Notification_Receivers; -with LSP.Server_Notifications; -with LSP.Server_Requests; -with LSP.Structures; +private with LSP.Server_Notification_Receivers; +limited private with LSP.Server_Notifications; +limited private with LSP.Server_Requests; +private with LSP.Structures.Hashes; package LSP.Known_Requests is @@ -61,22 +59,13 @@ private (Self : in out Visitor; Value : LSP.Structures.CancelParams); - function Hash - (Value : LSP.Structures.Integer_Or_Virtual_String) - return Ada.Containers.Hash_Type is - (case Value.Is_Integer is - when True => - Ada.Containers.Hash_Type'Mod (Value.Integer), - when False => - VSS.Strings.Hash (Value.Virtual_String)); - type Request_Access is access all LSP.Server_Requests.Server_Request'Class; package Request_Maps is new Ada.Containers.Hashed_Maps (Key_Type => LSP.Structures.Integer_Or_Virtual_String, -- id Element_Type => Request_Access, - Hash => Hash, + Hash => LSP.Structures.Hashes.Hash, Equivalent_Keys => LSP.Structures."=", "=" => "=");