From d551c902dad89aee2273f400ebb8d2b99c01043d Mon Sep 17 00:00:00 2001 From: Anthony Leonardo Gracio Date: Thu, 25 Jul 2024 15:02:08 +0000 Subject: [PATCH 1/4] Add '.' in GPR language server's triggerCharacters And adapt the tests accordingly, formatting them too. For eng/ide/ada_language_server#1398 --- source/gpr/lsp-gpr_handlers.adb | 2 +- .../completion_attribute_resolve/test.json | 632 +-- .../completion_package_resolve/test.json | 1118 ++-- .../gpr_lsp/completion_references/test.json | 4747 +++++++---------- testsuite/gpr_lsp/declaration/test.json | 1719 +++--- testsuite/gpr_lsp/definition/test.json | 1719 +++--- testsuite/gpr_lsp/gpr2_assertions/test.json | 357 +- .../gpr2_unexpected_exceptions/test.json | 259 +- .../import_using_space_string/test.json | 480 +- .../test.json | 375 +- .../invalid_file_name_support/test.json | 896 ++-- .../no_symbol_with_empty_name/test.json | 447 +- .../gpr_lsp/project_config.alire/test.json | 334 +- 13 files changed, 6094 insertions(+), 6991 deletions(-) diff --git a/source/gpr/lsp-gpr_handlers.adb b/source/gpr/lsp-gpr_handlers.adb index 33430c509..cfb0a6885 100644 --- a/source/gpr/lsp-gpr_handlers.adb +++ b/source/gpr/lsp-gpr_handlers.adb @@ -381,7 +381,7 @@ package body LSP.GPR_Handlers is Capabilities.declarationProvider := LSP.Constants.True; Capabilities.completionProvider := (Is_Set => True, - Value => (triggerCharacters => [" "], + Value => (triggerCharacters => [" ", "."], resolveProvider => LSP.Constants.True, others => <>)); diff --git a/testsuite/gpr_lsp/completion_attribute_resolve/test.json b/testsuite/gpr_lsp/completion_attribute_resolve/test.json index 96a4f2edb..a2254162f 100644 --- a/testsuite/gpr_lsp/completion_attribute_resolve/test.json +++ b/testsuite/gpr_lsp/completion_attribute_resolve/test.json @@ -1,353 +1,293 @@ [ - { - "comment": [ - "completion attributes resolve" - ] - }, - { - "start": { - "cmd": [ - "${ALS}", - "--language-gpr" - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 0, - "method": "initialize", - "params": { - "processId": 2243210, - "clientInfo": { - "name": "Visual Studio Code", - "version": "1.63.2" - }, - "rootUri": "$URI{.}", - "capabilities": { - "workspace": { - "applyEdit": true, - "workspaceEdit": { - "documentChanges": true, - "resourceOperations": [ - "create", - "rename", - "delete" - ], - "normalizesLineEndings": true - }, - "didChangeConfiguration": {}, - "didChangeWatchedFiles": {}, - "symbol": {}, - "executeCommand": {}, - "configuration": true, - "workspaceFolders": true, - "fileOperations": { - "dynamicRegistration": true, - "didCreate": true, - "didRename": true, - "didDelete": true, - "willCreate": true, - "willRename": true, - "willDelete": true - } - }, - "textDocument": { - "publishDiagnostics": {}, - "synchronization": {}, - "completion": { - "contextSupport": true, - "completionItem": { - "snippetSupport": true, - "commitCharactersSupport": true, - "documentationFormat": [ - "markdown", - "plaintext" - ], - "deprecatedSupport": true, - "preselectSupport": true, - "tagSupport": { - "valueSet": [ - 1 - ] + { + "comment": ["completion attributes resolve"] + }, + { + "start": { + "cmd": ["${ALS}", "--language-gpr"] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 0, + "method": "initialize", + "params": { + "processId": 2243210, + "clientInfo": { + "name": "Visual Studio Code", + "version": "1.63.2" + }, + "rootUri": "$URI{.}", + "capabilities": { + "workspace": { + "applyEdit": true, + "workspaceEdit": { + "documentChanges": true, + "resourceOperations": ["create", "rename", "delete"], + "normalizesLineEndings": true + }, + "didChangeConfiguration": {}, + "didChangeWatchedFiles": {}, + "symbol": {}, + "executeCommand": {}, + "configuration": true, + "workspaceFolders": true, + "fileOperations": { + "dynamicRegistration": true, + "didCreate": true, + "didRename": true, + "didDelete": true, + "willCreate": true, + "willRename": true, + "willDelete": true + } }, - "insertReplaceSupport": true, - "resolveSupport": { - "properties": [ - "documentation", - "detail", - "additionalTextEdits" - ] + "textDocument": { + "publishDiagnostics": {}, + "synchronization": {}, + "completion": { + "contextSupport": true, + "completionItem": { + "snippetSupport": true, + "commitCharactersSupport": true, + "documentationFormat": ["markdown", "plaintext"], + "deprecatedSupport": true, + "preselectSupport": true, + "tagSupport": { + "valueSet": [1] + }, + "insertReplaceSupport": true, + "resolveSupport": { + "properties": [ + "documentation", + "detail", + "additionalTextEdits" + ] + }, + "insertTextModeSupport": { + "valueSet": [1, 2] + } + }, + "completionItemKind": { + "valueSet": [ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 + ] + } + }, + "documentSymbol": {}, + "codeAction": {} }, - "insertTextModeSupport": { - "valueSet": [ - 1, - 2 - ] + "window": { + "workDoneProgress": true } - }, - "completionItemKind": { - "valueSet": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25 + } + } + }, + "wait": [ + { + "id": 0, + "result": { + "capabilities": { + "textDocumentSync": { + "openClose": true, + "change": 1 + }, + "completionProvider": { + "triggerCharacters": [" ", "."], + "resolveProvider": true + }, + "hoverProvider": true, + "documentSymbolProvider": {} + } + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 1, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{agg.gpr}" + }, + "position": { + "line": 1, + "character": 13 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "id": 1, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Project_Files", + "data": ["", "Project_Files"] + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "id": 2, + "method": "completionItem/resolve", + "params": { + "label": "Project_Files", + "insertTextFormat": 1, + "data": ["", "Project_Files"] + } + }, + "wait": [ + { + "id": 2, + "result": { + "label": "Project_Files", + "documentation": "Value is the list of aggregated projects.", + "insertTextFormat": 1, + "data": ["", "Project_Files"] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 3, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{agg.gpr}" + }, + "position": { + "line": 2, + "character": 7 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "id": 3, + "result": { + "isIncomplete": false, + "items": [] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 4, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{agg.gpr}" + }, + "position": { + "line": 4, + "character": 6 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "id": 4, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Switches", + "data": ["Builder", "Switches"] + } ] - } - }, - "documentSymbol": {}, - "codeAction": {} - }, - "window": { - "workDoneProgress": true + } + } + ] + } + }, + { + "send": { + "request": { + "id": 5, + "method": "completionItem/resolve", + "params": { + "label": "Switches", + "insertTextFormat": 1, + "data": ["Builder", "Switches"] + } + }, + "wait": [ + { + "id": 5, + "result": { + "label": "Switches", + "documentation": "Index is either a language name or a source file name. Value is the list of builder switches to be used when building an executable. Index is either the source file name of the executable to be built or its language name.", + "insertTextFormat": 1, + "data": ["Builder", "Switches"] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 6, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{agg.gpr}" + }, + "position": { + "line": 5, + "character": 6 + }, + "context": { + "triggerKind": 1 + } } - } - } - }, - "wait": [ - { - "id": 0, - "result": { - "capabilities": { - "textDocumentSync": { - "openClose": true, - "change": 1 - }, - "completionProvider": { - "triggerCharacters": [ - " " - ], - "resolveProvider": true - }, - "hoverProvider": true, - "documentSymbolProvider": {} + }, + "wait": [ + { + "id": 6, + "result": { + "isIncomplete": false, + "items": [] + } } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 1, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{agg.gpr}" - }, - "position": { - "line": 1, - "character": 13 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "id": 1, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Project_Files", - "data": [ - "", - "Project_Files" - ] - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "id": 2, - "method": "completionItem/resolve", - "params": { - "label": "Project_Files", - "insertTextFormat": 1, - "data": [ - "", - "Project_Files" - ] - } - }, - "wait": [ - { - "id": 2, - "result": { - "label": "Project_Files", - "documentation": "Value is the list of aggregated projects.", - "insertTextFormat": 1, - "data": [ - "", - "Project_Files" - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 3, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{agg.gpr}" - }, - "position": { - "line": 2, - "character": 7 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "id": 3, - "result": { - "isIncomplete": false, - "items": [] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 4, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{agg.gpr}" - }, - "position": { - "line": 4, - "character": 6 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "id": 4, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Switches", - "data": [ - "Builder", - "Switches" - ] - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "id": 5, - "method": "completionItem/resolve", - "params": { - "label": "Switches", - "insertTextFormat": 1, - "data": [ - "Builder", - "Switches" - ] - } - }, - "wait": [ - { - "id": 5, - "result": { - "label": "Switches", - "documentation": "Index is either a language name or a source file name. Value is the list of builder switches to be used when building an executable. Index is either the source file name of the executable to be built or its language name.", - "insertTextFormat": 1, - "data": [ - "Builder", - "Switches" - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 6, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{agg.gpr}" - }, - "position": { - "line": 5, - "character": 6 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "id": 6, - "result": { - "isIncomplete": false, - "items": [] - } - } - ] - } - }, - { - "stop": { - "exit_code": 0 - } - } -] \ No newline at end of file + ] + } + }, + { + "stop": { + "exit_code": 0 + } + } +] diff --git a/testsuite/gpr_lsp/completion_package_resolve/test.json b/testsuite/gpr_lsp/completion_package_resolve/test.json index 30d3afe08..997666499 100644 --- a/testsuite/gpr_lsp/completion_package_resolve/test.json +++ b/testsuite/gpr_lsp/completion_package_resolve/test.json @@ -1,615 +1,521 @@ [ - { - "comment": [ - "package completion/resolve" - ] - }, - { - "start": { - "cmd": [ - "${ALS}", - "--language-gpr" - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 0, - "method": "initialize", - "params": { - "processId": 2243210, - "clientInfo": { - "name": "Visual Studio Code", - "version": "1.63.2" - }, - "rootUri": "$URI{.}", - "capabilities": { - "workspace": { - "applyEdit": true, - "workspaceEdit": { - "documentChanges": true, - "resourceOperations": [ - "create", - "rename", - "delete" - ], - "normalizesLineEndings": true - }, - "didChangeConfiguration": {}, - "didChangeWatchedFiles": {}, - "symbol": {}, - "executeCommand": {}, - "configuration": true, - "workspaceFolders": true, - "fileOperations": { - "dynamicRegistration": true, - "didCreate": true, - "didRename": true, - "didDelete": true, - "willCreate": true, - "willRename": true, - "willDelete": true - } - }, - "textDocument": { - "publishDiagnostics": {}, - "synchronization": {}, - "completion": { - "contextSupport": true, - "completionItem": { - "snippetSupport": true, - "commitCharactersSupport": true, - "documentationFormat": [ - "markdown", - "plaintext" - ], - "deprecatedSupport": true, - "preselectSupport": true, - "tagSupport": { - "valueSet": [ - 1 - ] + { + "comment": ["package completion/resolve"] + }, + { + "start": { + "cmd": ["${ALS}", "--language-gpr"] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 0, + "method": "initialize", + "params": { + "processId": 2243210, + "clientInfo": { + "name": "Visual Studio Code", + "version": "1.63.2" + }, + "rootUri": "$URI{.}", + "capabilities": { + "workspace": { + "applyEdit": true, + "workspaceEdit": { + "documentChanges": true, + "resourceOperations": ["create", "rename", "delete"], + "normalizesLineEndings": true + }, + "didChangeConfiguration": {}, + "didChangeWatchedFiles": {}, + "symbol": {}, + "executeCommand": {}, + "configuration": true, + "workspaceFolders": true, + "fileOperations": { + "dynamicRegistration": true, + "didCreate": true, + "didRename": true, + "didDelete": true, + "willCreate": true, + "willRename": true, + "willDelete": true + } }, - "insertReplaceSupport": true, - "resolveSupport": { - "properties": [ - "documentation", - "detail", - "additionalTextEdits" - ] + "textDocument": { + "publishDiagnostics": {}, + "synchronization": {}, + "completion": { + "contextSupport": true, + "completionItem": { + "snippetSupport": true, + "commitCharactersSupport": true, + "documentationFormat": ["markdown", "plaintext"], + "deprecatedSupport": true, + "preselectSupport": true, + "tagSupport": { + "valueSet": [1] + }, + "insertReplaceSupport": true, + "resolveSupport": { + "properties": [ + "documentation", + "detail", + "additionalTextEdits" + ] + }, + "insertTextModeSupport": { + "valueSet": [1, 2] + } + }, + "completionItemKind": { + "valueSet": [ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 + ] + } + }, + "documentSymbol": {}, + "codeAction": {} }, - "insertTextModeSupport": { - "valueSet": [ - 1, - 2 - ] + "window": { + "workDoneProgress": true + } + } + } + }, + "wait": [ + { + "id": 0, + "result": { + "capabilities": { + "textDocumentSync": { + "openClose": true, + "change": 1 + }, + "completionProvider": { + "triggerCharacters": [" ", "."], + "resolveProvider": true + }, + "hoverProvider": true, + "documentSymbolProvider": {} } - }, - "completionItemKind": { - "valueSet": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25 + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "initialized", + "params": {} + }, + "wait": [] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "workspace/didChangeConfiguration", + "params": { + "settings": { + "ada": { + "scenarioVariables": {}, + "enableDiagnostics": false, + "defaultCharset": "ISO-8859-1" + } + } + } + }, + "wait": [] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 4, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{agg.gpr}" + }, + "position": { + "line": 1, + "character": 7 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "id": 4, + "result": { + "isIncomplete": false, + "items": [] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 5, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{agg.gpr}" + }, + "position": { + "line": 2, + "character": 8 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "id": 5, + "result": { + "isIncomplete": false, + "items": [] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 6, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{agg.gpr}" + }, + "position": { + "line": 2, + "character": 9 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "id": 6, + "result": { + "isIncomplete": false, + "items": [] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 7, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{agg.gpr}" + }, + "position": { + "line": 3, + "character": 9 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "id": 7, + "result": { + "isIncomplete": false, + "items": [] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 8, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{agg.gpr}" + }, + "position": { + "line": 3, + "character": 10 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "id": 8, + "result": { + "isIncomplete": false, + "items": [] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 9, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{agg.gpr}" + }, + "position": { + "line": 3, + "character": 11 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "id": 9, + "result": { + "isIncomplete": false, + "items": [] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 10, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{agg.gpr}" + }, + "position": { + "line": 2, + "character": 10 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "id": 10, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Builder", + "data": ["Builder"] + } ] - } - }, - "documentSymbol": {}, - "codeAction": {} - }, - "window": { - "workDoneProgress": true + } + } + ] + } + }, + { + "send": { + "request": { + "id": 11, + "method": "completionItem/resolve", + "params": { + "label": "Builder", + "insertTextFormat": 1, + "data": ["Builder"] } - } - } - }, - "wait": [ - { - "id": 0, - "result": { - "capabilities": { - "textDocumentSync": { - "openClose": true, - "change": 1 - }, - "completionProvider": { - "triggerCharacters": [ - " " - ], - "resolveProvider": true - }, - "hoverProvider": true, - "documentSymbolProvider": {} + }, + "wait": [ + { + "id": 11, + "result": { + "label": "Builder", + "documentation": "This package specifies the compilation options used when building an executable or a library for a project. Most of the options should be set in one of Compiler, Binder or Linker packages, but there are some general options that should be defined in this package.", + "insertTextFormat": 1, + "data": ["Builder"] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 12, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{agg.gpr}" + }, + "position": { + "line": 1, + "character": 8 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "id": 12, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Builder", + "data": ["Builder"] + }, + { + "label": "Clean", + "data": ["Clean"] + }, + { + "label": "Gnatls", + "data": ["Gnatls"] + }, + { + "label": "Install", + "data": ["Install"] + }, + { + "label": "Remote", + "data": ["Remote"] + }, + { + "label": "Pretty_Printer", + "data": ["Pretty_Printer"] + }, + { + "label": "Ide", + "data": ["Ide"] + }, + { + "label": "Ant", + "data": ["Ant"] + }, + { + "label": "Make", + "data": ["Make"] + }, + { + "label": "Analyzer", + "data": ["Analyzer"] + }, + { + "label": "Check", + "data": ["Check"] + }, + { + "label": "Codepeer", + "data": ["Codepeer"] + }, + { + "label": "Coverage", + "data": ["Coverage"] + }, + { + "label": "Dsa", + "data": ["Dsa"] + }, + { + "label": "Documentation", + "data": ["Documentation"] + }, + { + "label": "Emulator", + "data": ["Emulator"] + }, + { + "label": "Gnattest", + "data": ["Gnattest"] + }, + { + "label": "Prove", + "data": ["Prove"] + }, + { + "label": "Qgen", + "data": ["Qgen"] + }, + { + "label": "Stack", + "data": ["Stack"] + }, + { + "label": "Stub", + "data": ["Stub"] + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "id": 13, + "method": "completionItem/resolve", + "params": { + "label": "Ide", + "insertTextFormat": 1, + "data": ["Ide"] } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "initialized", - "params": {} - }, - "wait": [] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "workspace/didChangeConfiguration", - "params": { - "settings": { - "ada": { - "scenarioVariables": {}, - "enableDiagnostics": false, - "defaultCharset": "ISO-8859-1" + }, + "wait": [ + { + "id": 13, + "result": { + "label": "Ide", + "documentation": "This package specifies the options used by 'gnatstudio' IDE.", + "insertTextFormat": 1, + "data": ["Ide"] + } } - } - } - }, - "wait": [] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 4, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{agg.gpr}" - }, - "position": { - "line": 1, - "character": 7 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "id": 4, - "result": { - "isIncomplete": false, - "items": [] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 5, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{agg.gpr}" - }, - "position": { - "line": 2, - "character": 8 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "id": 5, - "result": { - "isIncomplete": false, - "items": [] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 6, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{agg.gpr}" - }, - "position": { - "line": 2, - "character": 9 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "id": 6, - "result": { - "isIncomplete": false, - "items": [] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 7, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{agg.gpr}" - }, - "position": { - "line": 3, - "character": 9 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "id": 7, - "result": { - "isIncomplete": false, - "items": [] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 8, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{agg.gpr}" - }, - "position": { - "line": 3, - "character": 10 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "id": 8, - "result": { - "isIncomplete": false, - "items": [] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 9, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{agg.gpr}" - }, - "position": { - "line": 3, - "character": 11 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "id": 9, - "result": { - "isIncomplete": false, - "items": [] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 10, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{agg.gpr}" - }, - "position": { - "line": 2, - "character": 10 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "id": 10, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Builder", - "data": [ - "Builder" - ] - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "id": 11, - "method": "completionItem/resolve", - "params": { - "label": "Builder", - "insertTextFormat": 1, - "data": [ - "Builder" - ] - } - }, - "wait": [ - { - "id": 11, - "result": { - "label": "Builder", - "documentation": "This package specifies the compilation options used when building an executable or a library for a project. Most of the options should be set in one of Compiler, Binder or Linker packages, but there are some general options that should be defined in this package.", - "insertTextFormat": 1, - "data": [ - "Builder" - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 12, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{agg.gpr}" - }, - "position": { - "line": 1, - "character": 8 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "id": 12, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Builder", - "data": [ - "Builder" - ] - }, - { - "label": "Clean", - "data": [ - "Clean" - ] - }, - { - "label": "Gnatls", - "data": [ - "Gnatls" - ] - }, - { - "label": "Install", - "data": [ - "Install" - ] - }, - { - "label": "Remote", - "data": [ - "Remote" - ] - }, - { - "label": "Pretty_Printer", - "data": [ - "Pretty_Printer" - ] - }, - { - "label": "Ide", - "data": [ - "Ide" - ] - }, - { - "label": "Ant", - "data": [ - "Ant" - ] - }, - { - "label": "Make", - "data": [ - "Make" - ] - }, - { - "label": "Analyzer", - "data": [ - "Analyzer" - ] - }, - { - "label": "Check", - "data": [ - "Check" - ] - }, - { - "label": "Codepeer", - "data": [ - "Codepeer" - ] - }, - { - "label": "Coverage", - "data": [ - "Coverage" - ] - }, - { - "label": "Dsa", - "data": [ - "Dsa" - ] - }, - { - "label": "Documentation", - "data": [ - "Documentation" - ] - }, - { - "label": "Emulator", - "data": [ - "Emulator" - ] - }, - { - "label": "Gnattest", - "data": [ - "Gnattest" - ] - }, - { - "label": "Prove", - "data": [ - "Prove" - ] - }, - { - "label": "Qgen", - "data": [ - "Qgen" - ] - }, - { - "label": "Stack", - "data": [ - "Stack" - ] - }, - { - "label": "Stub", - "data": [ - "Stub" - ] - } - ] - } - } - ] - } - }, + ] + } + }, { - "send": { - "request": { - "id": 13, - "method": "completionItem/resolve", - "params": { - "label": "Ide", - "insertTextFormat": 1, - "data": [ - "Ide" - ] - } - }, - "wait": [ - { - "id": 13, - "result": { - "label": "Ide", - "documentation": "This package specifies the options used by 'gnatstudio' IDE.", - "insertTextFormat": 1, - "data": [ - "Ide" - ] - } - } - ] - } - }, - { - "stop": { - "exit_code": 0 - } - } -] \ No newline at end of file + "stop": { + "exit_code": 0 + } + } +] diff --git a/testsuite/gpr_lsp/completion_references/test.json b/testsuite/gpr_lsp/completion_references/test.json index 435211a0a..9076f25c0 100644 --- a/testsuite/gpr_lsp/completion_references/test.json +++ b/testsuite/gpr_lsp/completion_references/test.json @@ -1,2720 +1,2043 @@ [ - { - "comment": [ - "references completion" - ] - }, - { - "start": { - "cmd": [ - "${ALS}", - "--language-gpr" - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 0, - "method": "initialize", - "params": { - "processId": 2243210, - "clientInfo": { - "name": "Visual Studio Code", - "version": "1.63.2" - }, - "rootUri": "$URI{.}", - "capabilities": { - "workspace": { - "applyEdit": true, - "workspaceEdit": { - "documentChanges": true, - "resourceOperations": [ - "create", - "rename", - "delete" - ], - "normalizesLineEndings": true - }, - "didChangeConfiguration": {}, - "didChangeWatchedFiles": {}, - "symbol": {}, - "executeCommand": {}, - "configuration": true, - "workspaceFolders": true, - "fileOperations": { - "dynamicRegistration": true, - "didCreate": true, - "didRename": true, - "didDelete": true, - "willCreate": true, - "willRename": true, - "willDelete": true - } - }, - "textDocument": { - "publishDiagnostics": {}, - "synchronization": {}, - "completion": { - "contextSupport": true, - "completionItem": { - "snippetSupport": true, - "commitCharactersSupport": true, - "documentationFormat": [ - "markdown", - "plaintext" - ], - "deprecatedSupport": true, - "preselectSupport": true, - "tagSupport": { - "valueSet": [ - 1 - ] + { + "comment": ["references completion"] + }, + { + "start": { + "cmd": ["${ALS}", "--language-gpr"] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 0, + "method": "initialize", + "params": { + "processId": 2243210, + "clientInfo": { + "name": "Visual Studio Code", + "version": "1.63.2" + }, + "rootUri": "$URI{.}", + "capabilities": { + "workspace": { + "applyEdit": true, + "workspaceEdit": { + "documentChanges": true, + "resourceOperations": ["create", "rename", "delete"], + "normalizesLineEndings": true + }, + "didChangeConfiguration": {}, + "didChangeWatchedFiles": {}, + "symbol": {}, + "executeCommand": {}, + "configuration": true, + "workspaceFolders": true, + "fileOperations": { + "dynamicRegistration": true, + "didCreate": true, + "didRename": true, + "didDelete": true, + "willCreate": true, + "willRename": true, + "willDelete": true + } }, - "insertReplaceSupport": true, - "resolveSupport": { - "properties": [ - "documentation", - "detail", - "additionalTextEdits" - ] + "textDocument": { + "publishDiagnostics": {}, + "synchronization": {}, + "completion": { + "contextSupport": true, + "completionItem": { + "snippetSupport": true, + "commitCharactersSupport": true, + "documentationFormat": ["markdown", "plaintext"], + "deprecatedSupport": true, + "preselectSupport": true, + "tagSupport": { + "valueSet": [1] + }, + "insertReplaceSupport": true, + "resolveSupport": { + "properties": [ + "documentation", + "detail", + "additionalTextEdits" + ] + }, + "insertTextModeSupport": { + "valueSet": [1, 2] + } + }, + "completionItemKind": { + "valueSet": [ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 + ] + } + }, + "documentSymbol": {}, + "codeAction": {} }, - "insertTextModeSupport": { - "valueSet": [ - 1, - 2 - ] + "window": { + "workDoneProgress": true } - }, - "completionItemKind": { - "valueSet": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25 + } + } + }, + "wait": [ + { + "id": 0, + "result": { + "capabilities": { + "textDocumentSync": { + "openClose": true, + "change": 1 + }, + "completionProvider": { + "triggerCharacters": [" ", "."], + "resolveProvider": true + }, + "hoverProvider": true, + "documentSymbolProvider": {} + } + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "initialized", + "params": {} + }, + "wait": [] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "workspace/didChangeConfiguration", + "params": { + "settings": { + "ada": { + "scenarioVariables": {}, + "enableDiagnostics": false, + "defaultCharset": "ISO-8859-1" + } + } + } + }, + "wait": [] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 12, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 12, + "character": 0 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 12, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "V2" + }, + { + "label": "V3" + }, + { + "label": "V4" + }, + { + "label": "V5" + }, + { + "label": "Binder", + "data": ["Binder"] + }, + { + "label": "Builder", + "data": ["Builder"] + }, + { + "label": "Clean", + "data": ["Clean"] + }, + { + "label": "Compiler", + "data": ["Compiler"] + }, + { + "label": "Gnatls", + "data": ["Gnatls"] + }, + { + "label": "Install", + "data": ["Install"] + }, + { + "label": "Linker", + "data": ["Linker"] + }, + { + "label": "Naming", + "data": ["Naming"] + }, + { + "label": "Remote", + "data": ["Remote"] + }, + { + "label": "Pretty_Printer", + "data": ["Pretty_Printer"] + }, + { + "label": "Ide", + "data": ["Ide"] + }, + { + "label": "Ant", + "data": ["Ant"] + }, + { + "label": "Make", + "data": ["Make"] + }, + { + "label": "Analyzer", + "data": ["Analyzer"] + }, + { + "label": "Check", + "data": ["Check"] + }, + { + "label": "Codepeer", + "data": ["Codepeer"] + }, + { + "label": "Coverage", + "data": ["Coverage"] + }, + { + "label": "Dsa", + "data": ["Dsa"] + }, + { + "label": "Documentation", + "data": ["Documentation"] + }, + { + "label": "Emulator", + "data": ["Emulator"] + }, + { + "label": "Gnattest", + "data": ["Gnattest"] + }, + { + "label": "Prove", + "data": ["Prove"] + }, + { + "label": "Qgen", + "data": ["Qgen"] + }, + { + "label": "Stack", + "data": ["Stack"] + }, + { + "label": "Stub", + "data": ["Stub"] + }, + { + "label": "project" + }, + { + "label": "Prj" + }, + { + "label": "Imported" + }, + { + "label": "Extended" + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 13, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 13, + "character": 0 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 13, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Imported_Variable" + }, + { + "label": "Binder", + "data": ["Binder"] + }, + { + "label": "Builder", + "data": ["Builder"] + }, + { + "label": "Clean", + "data": ["Clean"] + }, + { + "label": "Compiler", + "data": ["Compiler"] + }, + { + "label": "Gnatls", + "data": ["Gnatls"] + }, + { + "label": "Install", + "data": ["Install"] + }, + { + "label": "Linker", + "data": ["Linker"] + }, + { + "label": "Naming", + "data": ["Naming"] + }, + { + "label": "Remote", + "data": ["Remote"] + }, + { + "label": "Pretty_Printer", + "data": ["Pretty_Printer"] + }, + { + "label": "Ide", + "data": ["Ide"] + }, + { + "label": "Ant", + "data": ["Ant"] + }, + { + "label": "Make", + "data": ["Make"] + }, + { + "label": "Analyzer", + "data": ["Analyzer"] + }, + { + "label": "Check", + "data": ["Check"] + }, + { + "label": "Codepeer", + "data": ["Codepeer"] + }, + { + "label": "Coverage", + "data": ["Coverage"] + }, + { + "label": "Dsa", + "data": ["Dsa"] + }, + { + "label": "Documentation", + "data": ["Documentation"] + }, + { + "label": "Emulator", + "data": ["Emulator"] + }, + { + "label": "Gnattest", + "data": ["Gnattest"] + }, + { + "label": "Prove", + "data": ["Prove"] + }, + { + "label": "Qgen", + "data": ["Qgen"] + }, + { + "label": "Stack", + "data": ["Stack"] + }, + { + "label": "Stub", + "data": ["Stub"] + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 14, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 14, + "character": 0 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 14, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Imported_Compiler_Variable" + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 17, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 17, + "character": 0 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 17, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Archive_Builder", + "data": ["", "Archive_Builder"] + }, + { + "label": "Archive_Builder_Append_Option", + "data": ["", "Archive_Builder_Append_Option"] + }, + { + "label": "Archive_Indexer", + "data": ["", "Archive_Indexer"] + }, + { + "label": "Archive_Suffix", + "data": ["", "Archive_Suffix"] + }, + { + "label": "Canonical_Target", + "data": ["", "Canonical_Target"] + }, + { + "label": "Create_Missing_Dirs", + "data": ["", "Create_Missing_Dirs"] + }, + { + "label": "Config_Prj_File", + "data": ["", "Config_Prj_File"] + }, + { + "label": "Default_Language", + "data": ["", "Default_Language"] + }, + { + "label": "Excluded_Source_Files", + "data": ["", "Excluded_Source_Files"] + }, + { + "label": "Excluded_Source_Dirs", + "data": ["", "Excluded_Source_Dirs"] + }, + { + "label": "Excluded_Source_List_File", + "data": ["", "Excluded_Source_List_File"] + }, + { + "label": "Exec_Dir", + "data": ["", "Exec_Dir"] + }, + { + "label": "Externally_Built", + "data": ["", "Externally_Built"] + }, + { + "label": "Ignore_Source_Sub_Dirs", + "data": ["", "Ignore_Source_Sub_Dirs"] + }, + { + "label": "Include_Switches_Via_Spec", + "data": ["", "Include_Switches_Via_Spec"] + }, + { + "label": "Inherit_Source_Path", + "data": ["", "Inherit_Source_Path"] + }, + { + "label": "Interfaces", + "data": ["", "Interfaces"] + }, + { + "label": "Languages", + "data": ["", "Languages"] + }, + { + "label": "Leading_Library_Options", + "data": ["", "Leading_Library_Options"] + }, + { + "label": "Library_Auto_Init_Supported", + "data": ["", "Library_Auto_Init_Supported"] + }, + { + "label": "Library_Builder", + "data": ["", "Library_Builder"] + }, + { + "label": "Library_Encapsulated_Options", + "data": ["", "Library_Encapsulated_Options"] + }, + { + "label": "Library_Gcc", + "data": ["", "Library_Gcc"] + }, + { + "label": "Library_Install_Name_Option", + "data": ["", "Library_Install_Name_Option"] + }, + { + "label": "Library_Major_Minor_Id_Supported", + "data": ["", "Library_Major_Minor_Id_Supported"] + }, + { + "label": "Library_Partial_Linker", + "data": ["", "Library_Partial_Linker"] + }, + { + "label": "Library_Reference_Symbol_File", + "data": ["", "Library_Reference_Symbol_File"] + }, + { + "label": "Library_Rpath_Options", + "data": ["", "Library_Rpath_Options"] + }, + { + "label": "Library_Support", + "data": ["", "Library_Support"] + }, + { + "label": "Library_Version_Switches", + "data": ["", "Library_Version_Switches"] + }, + { + "label": "Locally_Removed_Files", + "data": ["", "Locally_Removed_Files"] + }, + { + "label": "Main", + "data": ["", "Main"] + }, + { + "label": "Name", + "data": ["", "Name"] + }, + { + "label": "Object_Dir", + "data": ["", "Object_Dir"] + }, + { + "label": "Object_Generated", + "data": ["", "Object_Generated"] + }, + { + "label": "Objects_Linked", + "data": ["", "Objects_Linked"] + }, + { + "label": "Object_Lister", + "data": ["", "Object_Lister"] + }, + { + "label": "Object_Lister_Matcher", + "data": ["", "Object_Lister_Matcher"] + }, + { + "label": "Origin_Project", + "data": ["", "Origin_Project"] + }, + { + "label": "Only_Dirs_With_Sources", + "data": ["", "Only_Dirs_With_Sources"] + }, + { + "label": "Project_Dir", + "data": ["", "Project_Dir"] + }, + { + "label": "Required_Toolchain_Version", + "data": ["", "Required_Toolchain_Version"] + }, + { + "label": "Roots", + "data": ["", "Roots"] + }, + { + "label": "Run_Path_Option", + "data": ["", "Run_Path_Option"] + }, + { + "label": "Run_Path_Origin", + "data": ["", "Run_Path_Origin"] + }, + { + "label": "Runtime", + "data": ["", "Runtime"] + }, + { + "label": "Runtime_Dir", + "data": ["", "Runtime_Dir"] + }, + { + "label": "Runtime_Library_Dir", + "data": ["", "Runtime_Library_Dir"] + }, + { + "label": "Runtime_Source_Dir", + "data": ["", "Runtime_Source_Dir"] + }, + { + "label": "Runtime_Source_Dirs", + "data": ["", "Runtime_Source_Dirs"] + }, + { + "label": "Separate_Run_Path_Options", + "data": ["", "Separate_Run_Path_Options"] + }, + { + "label": "Shared_Library_Minimum_Switches", + "data": ["", "Shared_Library_Minimum_Switches"] + }, + { + "label": "Shared_Library_Prefix", + "data": ["", "Shared_Library_Prefix"] + }, + { + "label": "Shared_Library_Suffix", + "data": ["", "Shared_Library_Suffix"] + }, + { + "label": "Source_Dirs", + "data": ["", "Source_Dirs"] + }, + { + "label": "Source_Files", + "data": ["", "Source_Files"] + }, + { + "label": "Source_List_File", + "data": ["", "Source_List_File"] + }, + { + "label": "Symbolic_Link_Supported", + "data": ["", "Symbolic_Link_Supported"] + }, + { + "label": "Target", + "data": ["", "Target"] + }, + { + "label": "Toolchain_Version", + "data": ["", "Toolchain_Version"] + }, + { + "label": "Toolchain_Name", + "data": ["", "Toolchain_Name"] + }, + { + "label": "Toolchain_Description", + "data": ["", "Toolchain_Description"] + }, + { + "label": "Toolchain_Path", + "data": ["", "Toolchain_Path"] + }, + { + "label": "Warning_Message", + "data": ["", "Warning_Message"] + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 20, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 20, + "character": 0 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 20, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Switches", + "data": ["Emulator", "Switches"] + }, + { + "label": "Debug_Port", + "data": ["Emulator", "Debug_Port"] + }, + { + "label": "Board", + "data": ["Emulator", "Board"] + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 23, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 23, + "character": 0 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 23, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "V2" + }, + { + "label": "V3" + }, + { + "label": "V4" + }, + { + "label": "V5" + }, + { + "label": "Binder", + "data": ["Binder"] + }, + { + "label": "Builder", + "data": ["Builder"] + }, + { + "label": "Clean", + "data": ["Clean"] + }, + { + "label": "Compiler", + "data": ["Compiler"] + }, + { + "label": "Gnatls", + "data": ["Gnatls"] + }, + { + "label": "Install", + "data": ["Install"] + }, + { + "label": "Linker", + "data": ["Linker"] + }, + { + "label": "Naming", + "data": ["Naming"] + }, + { + "label": "Remote", + "data": ["Remote"] + }, + { + "label": "Pretty_Printer", + "data": ["Pretty_Printer"] + }, + { + "label": "Ide", + "data": ["Ide"] + }, + { + "label": "Ant", + "data": ["Ant"] + }, + { + "label": "Make", + "data": ["Make"] + }, + { + "label": "Analyzer", + "data": ["Analyzer"] + }, + { + "label": "Check", + "data": ["Check"] + }, + { + "label": "Codepeer", + "data": ["Codepeer"] + }, + { + "label": "Coverage", + "data": ["Coverage"] + }, + { + "label": "Dsa", + "data": ["Dsa"] + }, + { + "label": "Documentation", + "data": ["Documentation"] + }, + { + "label": "Emulator", + "data": ["Emulator"] + }, + { + "label": "Gnattest", + "data": ["Gnattest"] + }, + { + "label": "Prove", + "data": ["Prove"] + }, + { + "label": "Qgen", + "data": ["Qgen"] + }, + { + "label": "Stack", + "data": ["Stack"] + }, + { + "label": "Stub", + "data": ["Stub"] + }, + { + "label": "project" + }, + { + "label": "Prj" + }, + { + "label": "Imported" + }, + { + "label": "Extended" + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 24, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 24, + "character": 0 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 24, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Default_Switches", + "data": ["Compiler", "Default_Switches"] + }, + { + "label": "Driver", + "data": ["Compiler", "Driver"] + }, + { + "label": "Required_Switches", + "data": ["Compiler", "Required_Switches"] + }, + { + "label": "Switches", + "data": ["Compiler", "Switches"] + }, + { + "label": "Config_Body_File_Name", + "data": ["Compiler", "Config_Body_File_Name"] + }, + { + "label": "Config_Body_File_Name_Index", + "data": ["Compiler", "Config_Body_File_Name_Index"] + }, + { + "label": "Config_Body_File_Name_Pattern", + "data": ["Compiler", "Config_Body_File_Name_Pattern"] + }, + { + "label": "Config_File_Switches", + "data": ["Compiler", "Config_File_Switches"] + }, + { + "label": "Config_File_Unique", + "data": ["Compiler", "Config_File_Unique"] + }, + { + "label": "Config_Spec_File_Name", + "data": ["Compiler", "Config_Spec_File_Name"] + }, + { + "label": "Config_Spec_File_Name_Index", + "data": ["Compiler", "Config_Spec_File_Name_Index"] + }, + { + "label": "Config_Spec_File_Name_Pattern", + "data": ["Compiler", "Config_Spec_File_Name_Pattern"] + }, + { + "label": "Dependency_Driver", + "data": ["Compiler", "Dependency_Driver"] + }, + { + "label": "Dependency_Kind", + "data": ["Compiler", "Dependency_Kind"] + }, + { + "label": "Dependency_Switches", + "data": ["Compiler", "Dependency_Switches"] + }, + { + "label": "Include_Path", + "data": ["Compiler", "Include_Path"] + }, + { + "label": "Include_Path_File", + "data": ["Compiler", "Include_Path_File"] + }, + { + "label": "Include_Switches", + "data": ["Compiler", "Include_Switches"] + }, + { + "label": "Language_Kind", + "data": ["Compiler", "Language_Kind"] + }, + { + "label": "Leading_Required_Switches", + "data": ["Compiler", "Leading_Required_Switches"] + }, + { + "label": "Local_Config_File", + "data": ["Compiler", "Local_Config_File"] + }, + { + "label": "Local_Configuration_Pragmas", + "data": ["Compiler", "Local_Configuration_Pragmas"] + }, + { + "label": "Mapping_Body_Suffix", + "data": ["Compiler", "Mapping_Body_Suffix"] + }, + { + "label": "Mapping_File_Switches", + "data": ["Compiler", "Mapping_File_Switches"] + }, + { + "label": "Mapping_Spec_Suffix", + "data": ["Compiler", "Mapping_Spec_Suffix"] + }, + { + "label": "Max_Command_Line_Length", + "data": ["Compiler", "Max_Command_Line_Length"] + }, + { + "label": "Multi_Unit_Object_Separator", + "data": ["Compiler", "Multi_Unit_Object_Separator"] + }, + { + "label": "Multi_Unit_Switches", + "data": ["Compiler", "Multi_Unit_Switches"] + }, + { + "label": "Object_File_Suffix", + "data": ["Compiler", "Object_File_Suffix"] + }, + { + "label": "Object_File_Switches", + "data": ["Compiler", "Object_File_Switches"] + }, + { + "label": "Object_Path_Switches", + "data": ["Compiler", "Object_Path_Switches"] + }, + { + "label": "Path_Syntax", + "data": ["Compiler", "Path_Syntax"] + }, + { + "label": "Pic_Option", + "data": ["Compiler", "Pic_Option"] + }, + { + "label": "Response_File_Format", + "data": ["Compiler", "Response_File_Format"] + }, + { + "label": "Response_File_Switches", + "data": ["Compiler", "Response_File_Switches"] + }, + { + "label": "Source_File_Switches", + "data": ["Compiler", "Source_File_Switches"] + }, + { + "label": "Trailing_Required_Switches", + "data": ["Compiler", "Trailing_Required_Switches"] + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 27, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 27, + "character": 0 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 27, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "V2" + }, + { + "label": "V3" + }, + { + "label": "V4" + }, + { + "label": "V5" + }, + { + "label": "Binder", + "data": ["Binder"] + }, + { + "label": "Builder", + "data": ["Builder"] + }, + { + "label": "Clean", + "data": ["Clean"] + }, + { + "label": "Compiler", + "data": ["Compiler"] + }, + { + "label": "Gnatls", + "data": ["Gnatls"] + }, + { + "label": "Install", + "data": ["Install"] + }, + { + "label": "Linker", + "data": ["Linker"] + }, + { + "label": "Naming", + "data": ["Naming"] + }, + { + "label": "Remote", + "data": ["Remote"] + }, + { + "label": "Pretty_Printer", + "data": ["Pretty_Printer"] + }, + { + "label": "Ide", + "data": ["Ide"] + }, + { + "label": "Ant", + "data": ["Ant"] + }, + { + "label": "Make", + "data": ["Make"] + }, + { + "label": "Analyzer", + "data": ["Analyzer"] + }, + { + "label": "Check", + "data": ["Check"] + }, + { + "label": "Codepeer", + "data": ["Codepeer"] + }, + { + "label": "Coverage", + "data": ["Coverage"] + }, + { + "label": "Dsa", + "data": ["Dsa"] + }, + { + "label": "Documentation", + "data": ["Documentation"] + }, + { + "label": "Emulator", + "data": ["Emulator"] + }, + { + "label": "Gnattest", + "data": ["Gnattest"] + }, + { + "label": "Prove", + "data": ["Prove"] + }, + { + "label": "Qgen", + "data": ["Qgen"] + }, + { + "label": "Stack", + "data": ["Stack"] + }, + { + "label": "Stub", + "data": ["Stub"] + }, + { + "label": "project" + }, + { + "label": "Prj" + }, + { + "label": "Imported" + }, + { + "label": "Extended" + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 30, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 30, + "character": 0 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 30, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "V2" + }, + { + "label": "V3" + }, + { + "label": "V4" + }, + { + "label": "V5" + }, + { + "label": "Binder", + "data": ["Binder"] + }, + { + "label": "Builder", + "data": ["Builder"] + }, + { + "label": "Clean", + "data": ["Clean"] + }, + { + "label": "Compiler", + "data": ["Compiler"] + }, + { + "label": "Gnatls", + "data": ["Gnatls"] + }, + { + "label": "Install", + "data": ["Install"] + }, + { + "label": "Linker", + "data": ["Linker"] + }, + { + "label": "Naming", + "data": ["Naming"] + }, + { + "label": "Remote", + "data": ["Remote"] + }, + { + "label": "Pretty_Printer", + "data": ["Pretty_Printer"] + }, + { + "label": "Ide", + "data": ["Ide"] + }, + { + "label": "Ant", + "data": ["Ant"] + }, + { + "label": "Make", + "data": ["Make"] + }, + { + "label": "Analyzer", + "data": ["Analyzer"] + }, + { + "label": "Check", + "data": ["Check"] + }, + { + "label": "Codepeer", + "data": ["Codepeer"] + }, + { + "label": "Coverage", + "data": ["Coverage"] + }, + { + "label": "Dsa", + "data": ["Dsa"] + }, + { + "label": "Documentation", + "data": ["Documentation"] + }, + { + "label": "Emulator", + "data": ["Emulator"] + }, + { + "label": "Gnattest", + "data": ["Gnattest"] + }, + { + "label": "Prove", + "data": ["Prove"] + }, + { + "label": "Qgen", + "data": ["Qgen"] + }, + { + "label": "Stack", + "data": ["Stack"] + }, + { + "label": "Stub", + "data": ["Stub"] + }, + { + "label": "project" + }, + { + "label": "Prj" + }, + { + "label": "Imported" + }, + { + "label": "Extended" + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 33, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 33, + "character": 0 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 33, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "V2" + }, + { + "label": "V3" + }, + { + "label": "V4" + }, + { + "label": "V5" + }, + { + "label": "Binder", + "data": ["Binder"] + }, + { + "label": "Builder", + "data": ["Builder"] + }, + { + "label": "Clean", + "data": ["Clean"] + }, + { + "label": "Compiler", + "data": ["Compiler"] + }, + { + "label": "Gnatls", + "data": ["Gnatls"] + }, + { + "label": "Install", + "data": ["Install"] + }, + { + "label": "Linker", + "data": ["Linker"] + }, + { + "label": "Naming", + "data": ["Naming"] + }, + { + "label": "Remote", + "data": ["Remote"] + }, + { + "label": "Pretty_Printer", + "data": ["Pretty_Printer"] + }, + { + "label": "Ide", + "data": ["Ide"] + }, + { + "label": "Ant", + "data": ["Ant"] + }, + { + "label": "Make", + "data": ["Make"] + }, + { + "label": "Analyzer", + "data": ["Analyzer"] + }, + { + "label": "Check", + "data": ["Check"] + }, + { + "label": "Codepeer", + "data": ["Codepeer"] + }, + { + "label": "Coverage", + "data": ["Coverage"] + }, + { + "label": "Dsa", + "data": ["Dsa"] + }, + { + "label": "Documentation", + "data": ["Documentation"] + }, + { + "label": "Emulator", + "data": ["Emulator"] + }, + { + "label": "Gnattest", + "data": ["Gnattest"] + }, + { + "label": "Prove", + "data": ["Prove"] + }, + { + "label": "Qgen", + "data": ["Qgen"] + }, + { + "label": "Stack", + "data": ["Stack"] + }, + { + "label": "Stub", + "data": ["Stub"] + }, + { + "label": "project" + }, + { + "label": "Prj" + }, + { + "label": "Imported" + }, + { + "label": "Extended" + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 36, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 36, + "character": 0 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 36, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "T1" + }, + { + "label": "Imported" + }, + { + "label": "Extended" + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 37, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 37, + "character": 0 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 37, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Imported_Type" + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 41, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 41, + "character": 0 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 41, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Extended_Type" + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 44, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 44, + "character": 1 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 44, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Extended" + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 47, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 47, + "character": 1 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 47, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Install", + "data": ["Install"] + }, + { + "label": "Ide", + "data": ["Ide"] + }, + { + "label": "Imported" + } ] - } - }, - "documentSymbol": {}, - "codeAction": {} - }, - "window": { - "workDoneProgress": true + } } - } - } - }, - "wait": [ - { - "id": 0, - "result": { - "capabilities": { - "textDocumentSync": { - "openClose": true, - "change": 1 - }, - "completionProvider": { - "triggerCharacters": [ - " " - ], - "resolveProvider": true - }, - "hoverProvider": true, - "documentSymbolProvider": {} + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 50, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 50, + "character": 1 + }, + "context": { + "triggerKind": 1 + } } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "initialized", - "params": {} - }, - "wait": [] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "workspace/didChangeConfiguration", - "params": { - "settings": { - "ada": { - "scenarioVariables": {}, - "enableDiagnostics": false, - "defaultCharset": "ISO-8859-1" + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 50, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Pretty_Printer", + "data": ["Pretty_Printer"] + }, + { + "label": "Prove", + "data": ["Prove"] + }, + { + "label": "project" + }, + { + "label": "Prj" + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 53, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 53, + "character": 1 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 53, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Emulator", + "data": ["Emulator"] + }, + { + "label": "Extended" + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 56, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 56, + "character": 1 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 56, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Install", + "data": ["Install"] + }, + { + "label": "Ide", + "data": ["Ide"] + }, + { + "label": "Imported" + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 59, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 59, + "character": 1 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 59, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Pretty_Printer", + "data": ["Pretty_Printer"] + }, + { + "label": "Prove", + "data": ["Prove"] + }, + { + "label": "project" + }, + { + "label": "Prj" + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 62, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 62, + "character": 1 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 62, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Name", + "data": ["", "Name"] + } + ] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 65, + "method": "textDocument/completion", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 65, + "character": 1 + }, + "context": { + "triggerKind": 1 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 65, + "result": { + "isIncomplete": false, + "items": [ + { + "label": "Extended_Variable" + }, + { + "label": "Emulator", + "data": ["Emulator"] + } + ] + } } - } - } - }, - "wait": [] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 12, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 12, - "character": 0 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 12, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "V2" - }, - { - "label": "V3" - }, - { - "label": "V4" - }, - { - "label": "V5" - }, - { - "label": "Binder", - "data": [ - "Binder" - ] - }, - { - "label": "Builder", - "data": [ - "Builder" - ] - }, - { - "label": "Clean", - "data": [ - "Clean" - ] - }, - { - "label": "Compiler", - "data": [ - "Compiler" - ] - }, - { - "label": "Gnatls", - "data": [ - "Gnatls" - ] - }, - { - "label": "Install", - "data": [ - "Install" - ] - }, - { - "label": "Linker", - "data": [ - "Linker" - ] - }, - { - "label": "Naming", - "data": [ - "Naming" - ] - }, - { - "label": "Remote", - "data": [ - "Remote" - ] - }, - { - "label": "Pretty_Printer", - "data": [ - "Pretty_Printer" - ] - }, - { - "label": "Ide", - "data": [ - "Ide" - ] - }, - { - "label": "Ant", - "data": [ - "Ant" - ] - }, - { - "label": "Make", - "data": [ - "Make" - ] - }, - { - "label": "Analyzer", - "data": [ - "Analyzer" - ] - }, - { - "label": "Check", - "data": [ - "Check" - ] - }, - { - "label": "Codepeer", - "data": [ - "Codepeer" - ] - }, - { - "label": "Coverage", - "data": [ - "Coverage" - ] - }, - { - "label": "Dsa", - "data": [ - "Dsa" - ] - }, - { - "label": "Documentation", - "data": [ - "Documentation" - ] - }, - { - "label": "Emulator", - "data": [ - "Emulator" - ] - }, - { - "label": "Gnattest", - "data": [ - "Gnattest" - ] - }, - { - "label": "Prove", - "data": [ - "Prove" - ] - }, - { - "label": "Qgen", - "data": [ - "Qgen" - ] - }, - { - "label": "Stack", - "data": [ - "Stack" - ] - }, - { - "label": "Stub", - "data": [ - "Stub" - ] - }, - { - "label": "project" - }, - { - "label": "Prj" - }, - { - "label": "Imported" - }, - { - "label": "Extended" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 13, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 13, - "character": 0 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 13, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Imported_Variable" - }, - { - "label": "Binder", - "data": [ - "Binder" - ] - }, - { - "label": "Builder", - "data": [ - "Builder" - ] - }, - { - "label": "Clean", - "data": [ - "Clean" - ] - }, - { - "label": "Compiler", - "data": [ - "Compiler" - ] - }, - { - "label": "Gnatls", - "data": [ - "Gnatls" - ] - }, - { - "label": "Install", - "data": [ - "Install" - ] - }, - { - "label": "Linker", - "data": [ - "Linker" - ] - }, - { - "label": "Naming", - "data": [ - "Naming" - ] - }, - { - "label": "Remote", - "data": [ - "Remote" - ] - }, - { - "label": "Pretty_Printer", - "data": [ - "Pretty_Printer" - ] - }, - { - "label": "Ide", - "data": [ - "Ide" - ] - }, - { - "label": "Ant", - "data": [ - "Ant" - ] - }, - { - "label": "Make", - "data": [ - "Make" - ] - }, - { - "label": "Analyzer", - "data": [ - "Analyzer" - ] - }, - { - "label": "Check", - "data": [ - "Check" - ] - }, - { - "label": "Codepeer", - "data": [ - "Codepeer" - ] - }, - { - "label": "Coverage", - "data": [ - "Coverage" - ] - }, - { - "label": "Dsa", - "data": [ - "Dsa" - ] - }, - { - "label": "Documentation", - "data": [ - "Documentation" - ] - }, - { - "label": "Emulator", - "data": [ - "Emulator" - ] - }, - { - "label": "Gnattest", - "data": [ - "Gnattest" - ] - }, - { - "label": "Prove", - "data": [ - "Prove" - ] - }, - { - "label": "Qgen", - "data": [ - "Qgen" - ] - }, - { - "label": "Stack", - "data": [ - "Stack" - ] - }, - { - "label": "Stub", - "data": [ - "Stub" - ] - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 14, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 14, - "character": 0 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 14, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Imported_Compiler_Variable" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 17, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 17, - "character": 0 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 17, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Archive_Builder", - "data": [ - "", - "Archive_Builder" - ] - }, - { - "label": "Archive_Builder_Append_Option", - "data": [ - "", - "Archive_Builder_Append_Option" - ] - }, - { - "label": "Archive_Indexer", - "data": [ - "", - "Archive_Indexer" - ] - }, - { - "label": "Archive_Suffix", - "data": [ - "", - "Archive_Suffix" - ] - }, - { - "label": "Canonical_Target", - "data": [ - "", - "Canonical_Target" - ] - }, - { - "label": "Create_Missing_Dirs", - "data": [ - "", - "Create_Missing_Dirs" - ] - }, - { - "label": "Config_Prj_File", - "data": [ - "", - "Config_Prj_File" - ] - }, - { - "label": "Default_Language", - "data": [ - "", - "Default_Language" - ] - }, - { - "label": "Excluded_Source_Files", - "data": [ - "", - "Excluded_Source_Files" - ] - }, - { - "label": "Excluded_Source_Dirs", - "data": [ - "", - "Excluded_Source_Dirs" - ] - }, - { - "label": "Excluded_Source_List_File", - "data": [ - "", - "Excluded_Source_List_File" - ] - }, - { - "label": "Exec_Dir", - "data": [ - "", - "Exec_Dir" - ] - }, - { - "label": "Externally_Built", - "data": [ - "", - "Externally_Built" - ] - }, - { - "label": "Ignore_Source_Sub_Dirs", - "data": [ - "", - "Ignore_Source_Sub_Dirs" - ] - }, - { - "label": "Include_Switches_Via_Spec", - "data": [ - "", - "Include_Switches_Via_Spec" - ] - }, - { - "label": "Inherit_Source_Path", - "data": [ - "", - "Inherit_Source_Path" - ] - }, - { - "label": "Interfaces", - "data": [ - "", - "Interfaces" - ] - }, - { - "label": "Languages", - "data": [ - "", - "Languages" - ] - }, - { - "label": "Leading_Library_Options", - "data": [ - "", - "Leading_Library_Options" - ] - }, - { - "label": "Library_Auto_Init_Supported", - "data": [ - "", - "Library_Auto_Init_Supported" - ] - }, - { - "label": "Library_Builder", - "data": [ - "", - "Library_Builder" - ] - }, - { - "label": "Library_Encapsulated_Options", - "data": [ - "", - "Library_Encapsulated_Options" - ] - }, - { - "label": "Library_Gcc", - "data": [ - "", - "Library_Gcc" - ] - }, - { - "label": "Library_Install_Name_Option", - "data": [ - "", - "Library_Install_Name_Option" - ] - }, - { - "label": "Library_Major_Minor_Id_Supported", - "data": [ - "", - "Library_Major_Minor_Id_Supported" - ] - }, - { - "label": "Library_Partial_Linker", - "data": [ - "", - "Library_Partial_Linker" - ] - }, - { - "label": "Library_Reference_Symbol_File", - "data": [ - "", - "Library_Reference_Symbol_File" - ] - }, - { - "label": "Library_Rpath_Options", - "data": [ - "", - "Library_Rpath_Options" - ] - }, - { - "label": "Library_Support", - "data": [ - "", - "Library_Support" - ] - }, - { - "label": "Library_Version_Switches", - "data": [ - "", - "Library_Version_Switches" - ] - }, - { - "label": "Locally_Removed_Files", - "data": [ - "", - "Locally_Removed_Files" - ] - }, - { - "label": "Main", - "data": [ - "", - "Main" - ] - }, - { - "label": "Name", - "data": [ - "", - "Name" - ] - }, - { - "label": "Object_Dir", - "data": [ - "", - "Object_Dir" - ] - }, - { - "label": "Object_Generated", - "data": [ - "", - "Object_Generated" - ] - }, - { - "label": "Objects_Linked", - "data": [ - "", - "Objects_Linked" - ] - }, - { - "label": "Object_Lister", - "data": [ - "", - "Object_Lister" - ] - }, - { - "label": "Object_Lister_Matcher", - "data": [ - "", - "Object_Lister_Matcher" - ] - }, - { - "label": "Origin_Project", - "data": [ - "", - "Origin_Project" - ] - }, - { - "label": "Only_Dirs_With_Sources", - "data": [ - "", - "Only_Dirs_With_Sources" - ] - }, - { - "label": "Project_Dir", - "data": [ - "", - "Project_Dir" - ] - }, - { - "label": "Required_Toolchain_Version", - "data": [ - "", - "Required_Toolchain_Version" - ] - }, - { - "label": "Roots", - "data": [ - "", - "Roots" - ] - }, - { - "label": "Run_Path_Option", - "data": [ - "", - "Run_Path_Option" - ] - }, - { - "label": "Run_Path_Origin", - "data": [ - "", - "Run_Path_Origin" - ] - }, - { - "label": "Runtime", - "data": [ - "", - "Runtime" - ] - }, - { - "label": "Runtime_Dir", - "data": [ - "", - "Runtime_Dir" - ] - }, - { - "label": "Runtime_Library_Dir", - "data": [ - "", - "Runtime_Library_Dir" - ] - }, - { - "label": "Runtime_Source_Dir", - "data": [ - "", - "Runtime_Source_Dir" - ] - }, - { - "label": "Runtime_Source_Dirs", - "data": [ - "", - "Runtime_Source_Dirs" - ] - }, - { - "label": "Separate_Run_Path_Options", - "data": [ - "", - "Separate_Run_Path_Options" - ] - }, - { - "label": "Shared_Library_Minimum_Switches", - "data": [ - "", - "Shared_Library_Minimum_Switches" - ] - }, - { - "label": "Shared_Library_Prefix", - "data": [ - "", - "Shared_Library_Prefix" - ] - }, - { - "label": "Shared_Library_Suffix", - "data": [ - "", - "Shared_Library_Suffix" - ] - }, - { - "label": "Source_Dirs", - "data": [ - "", - "Source_Dirs" - ] - }, - { - "label": "Source_Files", - "data": [ - "", - "Source_Files" - ] - }, - { - "label": "Source_List_File", - "data": [ - "", - "Source_List_File" - ] - }, - { - "label": "Symbolic_Link_Supported", - "data": [ - "", - "Symbolic_Link_Supported" - ] - }, - { - "label": "Target", - "data": [ - "", - "Target" - ] - }, - { - "label": "Toolchain_Version", - "data": [ - "", - "Toolchain_Version" - ] - }, - { - "label": "Toolchain_Name", - "data": [ - "", - "Toolchain_Name" - ] - }, - { - "label": "Toolchain_Description", - "data": [ - "", - "Toolchain_Description" - ] - }, - { - "label": "Toolchain_Path", - "data": [ - "", - "Toolchain_Path" - ] - }, - { - "label": "Warning_Message", - "data": [ - "", - "Warning_Message" - ] - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 20, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 20, - "character": 0 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 20, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Switches", - "data": [ - "Emulator", - "Switches" - ] - }, - { - "label": "Debug_Port", - "data": [ - "Emulator", - "Debug_Port" - ] - }, - { - "label": "Board", - "data": [ - "Emulator", - "Board" - ] - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 23, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 23, - "character": 0 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 23, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "V2" - }, - { - "label": "V3" - }, - { - "label": "V4" - }, - { - "label": "V5" - }, - { - "label": "Binder", - "data": [ - "Binder" - ] - }, - { - "label": "Builder", - "data": [ - "Builder" - ] - }, - { - "label": "Clean", - "data": [ - "Clean" - ] - }, - { - "label": "Compiler", - "data": [ - "Compiler" - ] - }, - { - "label": "Gnatls", - "data": [ - "Gnatls" - ] - }, - { - "label": "Install", - "data": [ - "Install" - ] - }, - { - "label": "Linker", - "data": [ - "Linker" - ] - }, - { - "label": "Naming", - "data": [ - "Naming" - ] - }, - { - "label": "Remote", - "data": [ - "Remote" - ] - }, - { - "label": "Pretty_Printer", - "data": [ - "Pretty_Printer" - ] - }, - { - "label": "Ide", - "data": [ - "Ide" - ] - }, - { - "label": "Ant", - "data": [ - "Ant" - ] - }, - { - "label": "Make", - "data": [ - "Make" - ] - }, - { - "label": "Analyzer", - "data": [ - "Analyzer" - ] - }, - { - "label": "Check", - "data": [ - "Check" - ] - }, - { - "label": "Codepeer", - "data": [ - "Codepeer" - ] - }, - { - "label": "Coverage", - "data": [ - "Coverage" - ] - }, - { - "label": "Dsa", - "data": [ - "Dsa" - ] - }, - { - "label": "Documentation", - "data": [ - "Documentation" - ] - }, - { - "label": "Emulator", - "data": [ - "Emulator" - ] - }, - { - "label": "Gnattest", - "data": [ - "Gnattest" - ] - }, - { - "label": "Prove", - "data": [ - "Prove" - ] - }, - { - "label": "Qgen", - "data": [ - "Qgen" - ] - }, - { - "label": "Stack", - "data": [ - "Stack" - ] - }, - { - "label": "Stub", - "data": [ - "Stub" - ] - }, - { - "label": "project" - }, - { - "label": "Prj" - }, - { - "label": "Imported" - }, - { - "label": "Extended" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 24, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 24, - "character": 0 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 24, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Default_Switches", - "data": [ - "Compiler", - "Default_Switches" - ] - }, - { - "label": "Driver", - "data": [ - "Compiler", - "Driver" - ] - }, - { - "label": "Required_Switches", - "data": [ - "Compiler", - "Required_Switches" - ] - }, - { - "label": "Switches", - "data": [ - "Compiler", - "Switches" - ] - }, - { - "label": "Config_Body_File_Name", - "data": [ - "Compiler", - "Config_Body_File_Name" - ] - }, - { - "label": "Config_Body_File_Name_Index", - "data": [ - "Compiler", - "Config_Body_File_Name_Index" - ] - }, - { - "label": "Config_Body_File_Name_Pattern", - "data": [ - "Compiler", - "Config_Body_File_Name_Pattern" - ] - }, - { - "label": "Config_File_Switches", - "data": [ - "Compiler", - "Config_File_Switches" - ] - }, - { - "label": "Config_File_Unique", - "data": [ - "Compiler", - "Config_File_Unique" - ] - }, - { - "label": "Config_Spec_File_Name", - "data": [ - "Compiler", - "Config_Spec_File_Name" - ] - }, - { - "label": "Config_Spec_File_Name_Index", - "data": [ - "Compiler", - "Config_Spec_File_Name_Index" - ] - }, - { - "label": "Config_Spec_File_Name_Pattern", - "data": [ - "Compiler", - "Config_Spec_File_Name_Pattern" - ] - }, - { - "label": "Dependency_Driver", - "data": [ - "Compiler", - "Dependency_Driver" - ] - }, - { - "label": "Dependency_Kind", - "data": [ - "Compiler", - "Dependency_Kind" - ] - }, - { - "label": "Dependency_Switches", - "data": [ - "Compiler", - "Dependency_Switches" - ] - }, - { - "label": "Include_Path", - "data": [ - "Compiler", - "Include_Path" - ] - }, - { - "label": "Include_Path_File", - "data": [ - "Compiler", - "Include_Path_File" - ] - }, - { - "label": "Include_Switches", - "data": [ - "Compiler", - "Include_Switches" - ] - }, - { - "label": "Language_Kind", - "data": [ - "Compiler", - "Language_Kind" - ] - }, - { - "label": "Leading_Required_Switches", - "data": [ - "Compiler", - "Leading_Required_Switches" - ] - }, - { - "label": "Local_Config_File", - "data": [ - "Compiler", - "Local_Config_File" - ] - }, - { - "label": "Local_Configuration_Pragmas", - "data": [ - "Compiler", - "Local_Configuration_Pragmas" - ] - }, - { - "label": "Mapping_Body_Suffix", - "data": [ - "Compiler", - "Mapping_Body_Suffix" - ] - }, - { - "label": "Mapping_File_Switches", - "data": [ - "Compiler", - "Mapping_File_Switches" - ] - }, - { - "label": "Mapping_Spec_Suffix", - "data": [ - "Compiler", - "Mapping_Spec_Suffix" - ] - }, - { - "label": "Max_Command_Line_Length", - "data": [ - "Compiler", - "Max_Command_Line_Length" - ] - }, - { - "label": "Multi_Unit_Object_Separator", - "data": [ - "Compiler", - "Multi_Unit_Object_Separator" - ] - }, - { - "label": "Multi_Unit_Switches", - "data": [ - "Compiler", - "Multi_Unit_Switches" - ] - }, - { - "label": "Object_File_Suffix", - "data": [ - "Compiler", - "Object_File_Suffix" - ] - }, - { - "label": "Object_File_Switches", - "data": [ - "Compiler", - "Object_File_Switches" - ] - }, - { - "label": "Object_Path_Switches", - "data": [ - "Compiler", - "Object_Path_Switches" - ] - }, - { - "label": "Path_Syntax", - "data": [ - "Compiler", - "Path_Syntax" - ] - }, - { - "label": "Pic_Option", - "data": [ - "Compiler", - "Pic_Option" - ] - }, - { - "label": "Response_File_Format", - "data": [ - "Compiler", - "Response_File_Format" - ] - }, - { - "label": "Response_File_Switches", - "data": [ - "Compiler", - "Response_File_Switches" - ] - }, - { - "label": "Source_File_Switches", - "data": [ - "Compiler", - "Source_File_Switches" - ] - }, - { - "label": "Trailing_Required_Switches", - "data": [ - "Compiler", - "Trailing_Required_Switches" - ] - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 27, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 27, - "character": 0 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 27, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "V2" - }, - { - "label": "V3" - }, - { - "label": "V4" - }, - { - "label": "V5" - }, - { - "label": "Binder", - "data": [ - "Binder" - ] - }, - { - "label": "Builder", - "data": [ - "Builder" - ] - }, - { - "label": "Clean", - "data": [ - "Clean" - ] - }, - { - "label": "Compiler", - "data": [ - "Compiler" - ] - }, - { - "label": "Gnatls", - "data": [ - "Gnatls" - ] - }, - { - "label": "Install", - "data": [ - "Install" - ] - }, - { - "label": "Linker", - "data": [ - "Linker" - ] - }, - { - "label": "Naming", - "data": [ - "Naming" - ] - }, - { - "label": "Remote", - "data": [ - "Remote" - ] - }, - { - "label": "Pretty_Printer", - "data": [ - "Pretty_Printer" - ] - }, - { - "label": "Ide", - "data": [ - "Ide" - ] - }, - { - "label": "Ant", - "data": [ - "Ant" - ] - }, - { - "label": "Make", - "data": [ - "Make" - ] - }, - { - "label": "Analyzer", - "data": [ - "Analyzer" - ] - }, - { - "label": "Check", - "data": [ - "Check" - ] - }, - { - "label": "Codepeer", - "data": [ - "Codepeer" - ] - }, - { - "label": "Coverage", - "data": [ - "Coverage" - ] - }, - { - "label": "Dsa", - "data": [ - "Dsa" - ] - }, - { - "label": "Documentation", - "data": [ - "Documentation" - ] - }, - { - "label": "Emulator", - "data": [ - "Emulator" - ] - }, - { - "label": "Gnattest", - "data": [ - "Gnattest" - ] - }, - { - "label": "Prove", - "data": [ - "Prove" - ] - }, - { - "label": "Qgen", - "data": [ - "Qgen" - ] - }, - { - "label": "Stack", - "data": [ - "Stack" - ] - }, - { - "label": "Stub", - "data": [ - "Stub" - ] - }, - { - "label": "project" - }, - { - "label": "Prj" - }, - { - "label": "Imported" - }, - { - "label": "Extended" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 30, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 30, - "character": 0 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 30, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "V2" - }, - { - "label": "V3" - }, - { - "label": "V4" - }, - { - "label": "V5" - }, - { - "label": "Binder", - "data": [ - "Binder" - ] - }, - { - "label": "Builder", - "data": [ - "Builder" - ] - }, - { - "label": "Clean", - "data": [ - "Clean" - ] - }, - { - "label": "Compiler", - "data": [ - "Compiler" - ] - }, - { - "label": "Gnatls", - "data": [ - "Gnatls" - ] - }, - { - "label": "Install", - "data": [ - "Install" - ] - }, - { - "label": "Linker", - "data": [ - "Linker" - ] - }, - { - "label": "Naming", - "data": [ - "Naming" - ] - }, - { - "label": "Remote", - "data": [ - "Remote" - ] - }, - { - "label": "Pretty_Printer", - "data": [ - "Pretty_Printer" - ] - }, - { - "label": "Ide", - "data": [ - "Ide" - ] - }, - { - "label": "Ant", - "data": [ - "Ant" - ] - }, - { - "label": "Make", - "data": [ - "Make" - ] - }, - { - "label": "Analyzer", - "data": [ - "Analyzer" - ] - }, - { - "label": "Check", - "data": [ - "Check" - ] - }, - { - "label": "Codepeer", - "data": [ - "Codepeer" - ] - }, - { - "label": "Coverage", - "data": [ - "Coverage" - ] - }, - { - "label": "Dsa", - "data": [ - "Dsa" - ] - }, - { - "label": "Documentation", - "data": [ - "Documentation" - ] - }, - { - "label": "Emulator", - "data": [ - "Emulator" - ] - }, - { - "label": "Gnattest", - "data": [ - "Gnattest" - ] - }, - { - "label": "Prove", - "data": [ - "Prove" - ] - }, - { - "label": "Qgen", - "data": [ - "Qgen" - ] - }, - { - "label": "Stack", - "data": [ - "Stack" - ] - }, - { - "label": "Stub", - "data": [ - "Stub" - ] - }, - { - "label": "project" - }, - { - "label": "Prj" - }, - { - "label": "Imported" - }, - { - "label": "Extended" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 33, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 33, - "character": 0 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 33, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "V2" - }, - { - "label": "V3" - }, - { - "label": "V4" - }, - { - "label": "V5" - }, - { - "label": "Binder", - "data": [ - "Binder" - ] - }, - { - "label": "Builder", - "data": [ - "Builder" - ] - }, - { - "label": "Clean", - "data": [ - "Clean" - ] - }, - { - "label": "Compiler", - "data": [ - "Compiler" - ] - }, - { - "label": "Gnatls", - "data": [ - "Gnatls" - ] - }, - { - "label": "Install", - "data": [ - "Install" - ] - }, - { - "label": "Linker", - "data": [ - "Linker" - ] - }, - { - "label": "Naming", - "data": [ - "Naming" - ] - }, - { - "label": "Remote", - "data": [ - "Remote" - ] - }, - { - "label": "Pretty_Printer", - "data": [ - "Pretty_Printer" - ] - }, - { - "label": "Ide", - "data": [ - "Ide" - ] - }, - { - "label": "Ant", - "data": [ - "Ant" - ] - }, - { - "label": "Make", - "data": [ - "Make" - ] - }, - { - "label": "Analyzer", - "data": [ - "Analyzer" - ] - }, - { - "label": "Check", - "data": [ - "Check" - ] - }, - { - "label": "Codepeer", - "data": [ - "Codepeer" - ] - }, - { - "label": "Coverage", - "data": [ - "Coverage" - ] - }, - { - "label": "Dsa", - "data": [ - "Dsa" - ] - }, - { - "label": "Documentation", - "data": [ - "Documentation" - ] - }, - { - "label": "Emulator", - "data": [ - "Emulator" - ] - }, - { - "label": "Gnattest", - "data": [ - "Gnattest" - ] - }, - { - "label": "Prove", - "data": [ - "Prove" - ] - }, - { - "label": "Qgen", - "data": [ - "Qgen" - ] - }, - { - "label": "Stack", - "data": [ - "Stack" - ] - }, - { - "label": "Stub", - "data": [ - "Stub" - ] - }, - { - "label": "project" - }, - { - "label": "Prj" - }, - { - "label": "Imported" - }, - { - "label": "Extended" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 36, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 36, - "character": 0 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 36, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "T1" - }, - { - "label": "Imported" - }, - { - "label": "Extended" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 37, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 37, - "character": 0 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 37, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Imported_Type" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 41, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 41, - "character": 0 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 41, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Extended_Type" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 44, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 44, - "character": 1 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 44, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Extended" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 47, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 47, - "character": 1 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 47, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Install", - "data": [ - "Install" - ] - }, - { - "label": "Ide", - "data": [ - "Ide" - ] - }, - { - "label": "Imported" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 50, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 50, - "character": 1 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 50, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Pretty_Printer", - "data": [ - "Pretty_Printer" - ] - }, - { - "label": "Prove", - "data": [ - "Prove" - ] - }, - { - "label": "project" - }, - { - "label": "Prj" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 53, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 53, - "character": 1 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 53, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Emulator", - "data": [ - "Emulator" - ] - }, - { - "label": "Extended" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 56, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 56, - "character": 1 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 56, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Install", - "data": [ - "Install" - ] - }, - { - "label": "Ide", - "data": [ - "Ide" - ] - }, - { - "label": "Imported" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 59, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 59, - "character": 1 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 59, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Pretty_Printer", - "data": [ - "Pretty_Printer" - ] - }, - { - "label": "Prove", - "data": [ - "Prove" - ] - }, - { - "label": "project" - }, - { - "label": "Prj" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 62, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 62, - "character": 1 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 62, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Name", - "data": [ - "", - "Name" - ] - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 65, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 65, - "character": 1 - }, - "context": { - "triggerKind": 1 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 65, - "result": { - "isIncomplete": false, - "items": [ - { - "label": "Extended_Variable" - }, - { - "label": "Emulator", - "data": [ - "Emulator" - ] - } - ] - } - } - ] - } - }, - { - "stop": { - "exit_code": 0 - } - } -] \ No newline at end of file + ] + } + }, + { + "stop": { + "exit_code": 0 + } + } +] diff --git a/testsuite/gpr_lsp/declaration/test.json b/testsuite/gpr_lsp/declaration/test.json index c21b92a29..c9553d1b2 100644 --- a/testsuite/gpr_lsp/declaration/test.json +++ b/testsuite/gpr_lsp/declaration/test.json @@ -1,887 +1,880 @@ [ - { - "comment": [ - "test textDocument/declaration request works" - ] - }, - { - "start": { - "cmd": [ - "${ALS}", - "--language-gpr" - ] - } - }, - { - "send": { - "request": { - "params": { - "processId": 30612, - "capabilities": { - "workspace": { - "applyEdit": false - } - }, - "rootUri": "$URI{.}" - }, - "jsonrpc": "2.0", - "id": 1, - "method": "initialize" - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 1, - "result": { - "capabilities": { - "textDocumentSync": { - "openClose": true, - "change": 1 - }, - "completionProvider": { - "triggerCharacters": [ - " " - ], - "resolveProvider": true - }, - "hoverProvider": true, - "declarationProvider": true, - "documentSymbolProvider": {} + { + "comment": ["test textDocument/declaration request works"] + }, + { + "start": { + "cmd": ["${ALS}", "--language-gpr"] + } + }, + { + "send": { + "request": { + "params": { + "processId": 30612, + "capabilities": { + "workspace": { + "applyEdit": false + } + }, + "rootUri": "$URI{.}" + }, + "jsonrpc": "2.0", + "id": 1, + "method": "initialize" + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 1, + "result": { + "capabilities": { + "textDocumentSync": { + "openClose": true, + "change": 1 + }, + "completionProvider": { + "triggerCharacters": [" ", "."], + "resolveProvider": true + }, + "hoverProvider": true, + "declarationProvider": true, + "documentSymbolProvider": {} + } + } } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "initialized" - }, - "wait": [] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 3, - "character": 29 - }, - "textDocument": { - "uri": "$URI{aggregating.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 329, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 329, - "result": { - "range": { - "start": { - "line": 1, - "character": 8 - }, - "end": { - "line": 1, - "character": 18 - } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "initialized" + }, + "wait": [] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 3, + "character": 29 + }, + "textDocument": { + "uri": "$URI{aggregating.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 0, - "character": 25 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 25, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 25, - "result": { - "range": { - "start": { - "line": 0, - "character": 17 - }, - "end": { - "line": 0, - "character": 25 - } + "jsonrpc": "2.0", + "id": 329, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 329, + "result": { + "range": { + "start": { + "line": 1, + "character": 8 + }, + "end": { + "line": 1, + "character": 18 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 0, + "character": 25 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 4, - "character": 7 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 47, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 47, - "result": { - "range": { - "start": { - "line": 3, - "character": 8 - }, - "end": { - "line": 3, - "character": 9 - } + "jsonrpc": "2.0", + "id": 25, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 25, + "result": { + "range": { + "start": { + "line": 0, + "character": 17 + }, + "end": { + "line": 0, + "character": 25 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 4, + "character": 7 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 8, - "character": 31 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 831, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 831, - "result": { - "range": { - "start": { - "line": 7, - "character": 6 - }, - "end": { - "line": 7, - "character": 7 - } + "jsonrpc": "2.0", + "id": 47, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 47, + "result": { + "range": { + "start": { + "line": 3, + "character": 8 + }, + "end": { + "line": 3, + "character": 9 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 8, + "character": 31 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 9, - "character": 16 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 916, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 916, - "result": { - "range": { - "start": { - "line": 1, - "character": 8 - }, - "end": { - "line": 1, - "character": 18 - } + "jsonrpc": "2.0", + "id": 831, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 831, + "result": { + "range": { + "start": { + "line": 7, + "character": 6 + }, + "end": { + "line": 7, + "character": 7 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 9, + "character": 16 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 9, - "character": 26 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 926, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 926, - "result": { - "range": { - "start": { - "line": 6, - "character": 11 - }, - "end": { - "line": 6, - "character": 19 - } + "jsonrpc": "2.0", + "id": 916, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 916, + "result": { + "range": { + "start": { + "line": 1, + "character": 8 + }, + "end": { + "line": 1, + "character": 18 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 9, + "character": 26 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 9, - "character": 34 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 934, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 934, - "result": { - "range": { - "start": { - "line": 8, - "character": 10 - }, - "end": { - "line": 8, - "character": 18 - } + "jsonrpc": "2.0", + "id": 926, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 926, + "result": { + "range": { + "start": { + "line": 6, + "character": 11 + }, + "end": { + "line": 6, + "character": 19 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 9, + "character": 34 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 10, - "character": 16 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1016, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 1016, - "result": { - "range": { - "start": { - "line": 6, - "character": 11 - }, - "end": { - "line": 6, - "character": 19 - } + "jsonrpc": "2.0", + "id": 934, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 934, + "result": { + "range": { + "start": { + "line": 8, + "character": 10 + }, + "end": { + "line": 8, + "character": 18 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 10, + "character": 16 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 10, - "character": 22 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1022, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 1022, - "result": { - "range": { - "start": { - "line": 8, - "character": 10 - }, - "end": { - "line": 8, - "character": 18 - } + "jsonrpc": "2.0", + "id": 1016, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 1016, + "result": { + "range": { + "start": { + "line": 6, + "character": 11 + }, + "end": { + "line": 6, + "character": 19 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 10, + "character": 22 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 11, - "character": 21 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1121, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 1121, - "result": { - "range": { - "start": { - "line": 7, - "character": 6 - }, - "end": { - "line": 7, - "character": 7 - } + "jsonrpc": "2.0", + "id": 1022, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 1022, + "result": { + "range": { + "start": { + "line": 8, + "character": 10 + }, + "end": { + "line": 8, + "character": 18 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 11, + "character": 21 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 12, - "character": 20 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1220, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 1220, - "result": { - "range": { - "start": { - "line": 1, - "character": 8 - }, - "end": { - "line": 1, - "character": 9 - } + "jsonrpc": "2.0", + "id": 1121, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 1121, + "result": { + "range": { + "start": { + "line": 7, + "character": 6 + }, + "end": { + "line": 7, + "character": 7 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 12, + "character": 20 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 12, - "character": 34 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1234, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 1234, - "result": { - "range": { - "start": { - "line": 2, - "character": 3 - }, - "end": { - "line": 2, - "character": 4 - } + "jsonrpc": "2.0", + "id": 1220, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 1220, + "result": { + "range": { + "start": { + "line": 1, + "character": 8 + }, + "end": { + "line": 1, + "character": 9 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 12, + "character": 34 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 12, - "character": 13 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1213, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 1213, - "result": { - "range": { - "start": { - "line": 0, - "character": 17 - }, - "end": { - "line": 0, - "character": 25 - } + "jsonrpc": "2.0", + "id": 1234, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 1234, + "result": { + "range": { + "start": { + "line": 2, + "character": 3 + }, + "end": { + "line": 2, + "character": 4 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 12, + "character": 13 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 13, - "character": 14 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1314, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 1314, - "result": { - "range": { - "start": { - "line": 0, - "character": 17 - }, - "end": { - "line": 0, - "character": 25 - } + "jsonrpc": "2.0", + "id": 1213, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 1213, + "result": { + "range": { + "start": { + "line": 0, + "character": 17 + }, + "end": { + "line": 0, + "character": 25 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 13, + "character": 14 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 13, - "character": 21 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1321, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 1321, - "result": { - "range": { - "start": { - "line": 3, - "character": 7 - }, - "end": { - "line": 3, - "character": 15 - } + "jsonrpc": "2.0", + "id": 1314, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 1314, + "result": { + "range": { + "start": { + "line": 0, + "character": 17 + }, + "end": { + "line": 0, + "character": 25 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 13, + "character": 21 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 14, - "character": 22 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1422, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 1422, - "result": { - "range": { - "start": { - "line": 4, - "character": 11 - }, - "end": { - "line": 4, - "character": 19 - } + "jsonrpc": "2.0", + "id": 1321, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 1321, + "result": { + "range": { + "start": { + "line": 3, + "character": 7 + }, + "end": { + "line": 3, + "character": 15 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 14, + "character": 22 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 14, - "character": 34 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1434, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 1434, - "result": { - "range": { - "start": { - "line": 6, - "character": 10 - }, - "end": { - "line": 6, - "character": 18 - } + "jsonrpc": "2.0", + "id": 1422, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 1422, + "result": { + "range": { + "start": { + "line": 4, + "character": 11 + }, + "end": { + "line": 4, + "character": 19 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 14, + "character": 34 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 15, - "character": 27 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1527, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 1527, - "result": { - "range": { - "start": { - "line": 4, - "character": 11 - }, - "end": { - "line": 4, - "character": 19 - } + "jsonrpc": "2.0", + "id": 1434, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 1434, + "result": { + "range": { + "start": { + "line": 6, + "character": 10 + }, + "end": { + "line": 6, + "character": 18 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 15, + "character": 27 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 15, - "character": 30 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1530, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 1530, - "result": { - "range": { - "start": { - "line": 5, - "character": 6 - }, - "end": { - "line": 5, - "character": 7 - } + "jsonrpc": "2.0", + "id": 1527, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 1527, + "result": { + "range": { + "start": { + "line": 4, + "character": 11 + }, + "end": { + "line": 4, + "character": 19 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 15, + "character": 30 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 17, - "character": 38 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1738, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 1738, - "result": { - "range": { - "start": { - "line": 8, - "character": 11 - }, - "end": { - "line": 8, - "character": 18 - } + "jsonrpc": "2.0", + "id": 1530, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 1530, + "result": { + "range": { + "start": { + "line": 5, + "character": 6 + }, + "end": { + "line": 5, + "character": 7 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 17, + "character": 38 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 18, - "character": 38 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1838, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 1838, - "result": { - "range": { - "start": { - "line": 10, - "character": 11 - }, - "end": { - "line": 10, - "character": 17 - } + "jsonrpc": "2.0", + "id": 1738, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 1738, + "result": { + "range": { + "start": { + "line": 8, + "character": 11 + }, + "end": { + "line": 8, + "character": 18 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 18, + "character": 38 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 20, - "character": 9 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 209, - "method": "textDocument/declaration" - }, - "wait": [ - { - "id": 209, - "result": { - "range": { - "start": { - "line": 4, - "character": 3 - }, - "end": { - "line": 4, - "character": 4 - } + "jsonrpc": "2.0", + "id": 1838, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 1838, + "result": { + "range": { + "start": { + "line": 10, + "character": 11 + }, + "end": { + "line": 10, + "character": 17 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 20, + "character": 9 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "shutdown", - "method": "shutdown", - "params": null - }, - "wait": [ - { - "id": "shutdown", - "result": null - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "exit" - }, - "wait": [] - } - }, - { - "stop": { - "exit_code": 0 - } - } -] \ No newline at end of file + "jsonrpc": "2.0", + "id": 209, + "method": "textDocument/declaration" + }, + "wait": [ + { + "id": 209, + "result": { + "range": { + "start": { + "line": 4, + "character": 3 + }, + "end": { + "line": 4, + "character": 4 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "shutdown", + "method": "shutdown", + "params": null + }, + "wait": [ + { + "id": "shutdown", + "result": null + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "exit" + }, + "wait": [] + } + }, + { + "stop": { + "exit_code": 0 + } + } +] diff --git a/testsuite/gpr_lsp/definition/test.json b/testsuite/gpr_lsp/definition/test.json index 2484db4a7..176765b91 100644 --- a/testsuite/gpr_lsp/definition/test.json +++ b/testsuite/gpr_lsp/definition/test.json @@ -1,887 +1,880 @@ [ - { - "comment": [ - "test textDocument/definition request works" - ] - }, - { - "start": { - "cmd": [ - "${ALS}", - "--language-gpr" - ] - } - }, - { - "send": { - "request": { - "params": { - "processId": 30612, - "capabilities": { - "workspace": { - "applyEdit": false - } - }, - "rootUri": "$URI{.}" - }, - "jsonrpc": "2.0", - "id": 1, - "method": "initialize" - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 1, - "result": { - "capabilities": { - "textDocumentSync": { - "openClose": true, - "change": 1 - }, - "completionProvider": { - "triggerCharacters": [ - " " - ], - "resolveProvider": true - }, - "hoverProvider": true, - "definitionProvider": true, - "documentSymbolProvider": {} + { + "comment": ["test textDocument/definition request works"] + }, + { + "start": { + "cmd": ["${ALS}", "--language-gpr"] + } + }, + { + "send": { + "request": { + "params": { + "processId": 30612, + "capabilities": { + "workspace": { + "applyEdit": false + } + }, + "rootUri": "$URI{.}" + }, + "jsonrpc": "2.0", + "id": 1, + "method": "initialize" + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 1, + "result": { + "capabilities": { + "textDocumentSync": { + "openClose": true, + "change": 1 + }, + "completionProvider": { + "triggerCharacters": [" ", "."], + "resolveProvider": true + }, + "hoverProvider": true, + "definitionProvider": true, + "documentSymbolProvider": {} + } + } } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "initialized" - }, - "wait": [] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 3, - "character": 29 - }, - "textDocument": { - "uri": "$URI{aggregating.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 329, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 329, - "result": { - "range": { - "start": { - "line": 1, - "character": 8 - }, - "end": { - "line": 1, - "character": 18 - } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "initialized" + }, + "wait": [] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 3, + "character": 29 + }, + "textDocument": { + "uri": "$URI{aggregating.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 0, - "character": 25 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 25, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 25, - "result": { - "range": { - "start": { - "line": 0, - "character": 17 - }, - "end": { - "line": 0, - "character": 25 - } + "jsonrpc": "2.0", + "id": 329, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 329, + "result": { + "range": { + "start": { + "line": 1, + "character": 8 + }, + "end": { + "line": 1, + "character": 18 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 0, + "character": 25 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 4, - "character": 7 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 47, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 47, - "result": { - "range": { - "start": { - "line": 3, - "character": 8 - }, - "end": { - "line": 3, - "character": 9 - } + "jsonrpc": "2.0", + "id": 25, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 25, + "result": { + "range": { + "start": { + "line": 0, + "character": 17 + }, + "end": { + "line": 0, + "character": 25 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 4, + "character": 7 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 8, - "character": 31 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 831, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 831, - "result": { - "range": { - "start": { - "line": 7, - "character": 6 - }, - "end": { - "line": 7, - "character": 7 - } + "jsonrpc": "2.0", + "id": 47, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 47, + "result": { + "range": { + "start": { + "line": 3, + "character": 8 + }, + "end": { + "line": 3, + "character": 9 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 8, + "character": 31 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 9, - "character": 16 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 916, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 916, - "result": { - "range": { - "start": { - "line": 1, - "character": 8 - }, - "end": { - "line": 1, - "character": 18 - } + "jsonrpc": "2.0", + "id": 831, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 831, + "result": { + "range": { + "start": { + "line": 7, + "character": 6 + }, + "end": { + "line": 7, + "character": 7 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 9, + "character": 16 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 9, - "character": 26 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 926, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 926, - "result": { - "range": { - "start": { - "line": 6, - "character": 11 - }, - "end": { - "line": 6, - "character": 19 - } + "jsonrpc": "2.0", + "id": 916, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 916, + "result": { + "range": { + "start": { + "line": 1, + "character": 8 + }, + "end": { + "line": 1, + "character": 18 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 9, + "character": 26 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 9, - "character": 34 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 934, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 934, - "result": { - "range": { - "start": { - "line": 8, - "character": 10 - }, - "end": { - "line": 8, - "character": 18 - } + "jsonrpc": "2.0", + "id": 926, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 926, + "result": { + "range": { + "start": { + "line": 6, + "character": 11 + }, + "end": { + "line": 6, + "character": 19 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 9, + "character": 34 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 10, - "character": 16 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1016, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 1016, - "result": { - "range": { - "start": { - "line": 6, - "character": 11 - }, - "end": { - "line": 6, - "character": 19 - } + "jsonrpc": "2.0", + "id": 934, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 934, + "result": { + "range": { + "start": { + "line": 8, + "character": 10 + }, + "end": { + "line": 8, + "character": 18 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 10, + "character": 16 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 10, - "character": 22 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1022, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 1022, - "result": { - "range": { - "start": { - "line": 8, - "character": 10 - }, - "end": { - "line": 8, - "character": 18 - } + "jsonrpc": "2.0", + "id": 1016, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 1016, + "result": { + "range": { + "start": { + "line": 6, + "character": 11 + }, + "end": { + "line": 6, + "character": 19 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 10, + "character": 22 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 11, - "character": 21 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1121, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 1121, - "result": { - "range": { - "start": { - "line": 7, - "character": 6 - }, - "end": { - "line": 7, - "character": 7 - } + "jsonrpc": "2.0", + "id": 1022, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 1022, + "result": { + "range": { + "start": { + "line": 8, + "character": 10 + }, + "end": { + "line": 8, + "character": 18 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 11, + "character": 21 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 12, - "character": 20 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1220, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 1220, - "result": { - "range": { - "start": { - "line": 1, - "character": 8 - }, - "end": { - "line": 1, - "character": 9 - } + "jsonrpc": "2.0", + "id": 1121, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 1121, + "result": { + "range": { + "start": { + "line": 7, + "character": 6 + }, + "end": { + "line": 7, + "character": 7 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 12, + "character": 20 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 12, - "character": 34 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1234, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 1234, - "result": { - "range": { - "start": { - "line": 2, - "character": 3 - }, - "end": { - "line": 2, - "character": 4 - } + "jsonrpc": "2.0", + "id": 1220, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 1220, + "result": { + "range": { + "start": { + "line": 1, + "character": 8 + }, + "end": { + "line": 1, + "character": 9 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 12, + "character": 34 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 12, - "character": 13 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1213, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 1213, - "result": { - "range": { - "start": { - "line": 0, - "character": 17 - }, - "end": { - "line": 0, - "character": 25 - } + "jsonrpc": "2.0", + "id": 1234, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 1234, + "result": { + "range": { + "start": { + "line": 2, + "character": 3 + }, + "end": { + "line": 2, + "character": 4 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 12, + "character": 13 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 13, - "character": 14 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1314, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 1314, - "result": { - "range": { - "start": { - "line": 0, - "character": 17 - }, - "end": { - "line": 0, - "character": 25 - } + "jsonrpc": "2.0", + "id": 1213, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 1213, + "result": { + "range": { + "start": { + "line": 0, + "character": 17 + }, + "end": { + "line": 0, + "character": 25 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 13, + "character": 14 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 13, - "character": 21 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1321, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 1321, - "result": { - "range": { - "start": { - "line": 3, - "character": 7 - }, - "end": { - "line": 3, - "character": 15 - } + "jsonrpc": "2.0", + "id": 1314, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 1314, + "result": { + "range": { + "start": { + "line": 0, + "character": 17 + }, + "end": { + "line": 0, + "character": 25 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 13, + "character": 21 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 14, - "character": 22 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1422, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 1422, - "result": { - "range": { - "start": { - "line": 4, - "character": 11 - }, - "end": { - "line": 4, - "character": 19 - } + "jsonrpc": "2.0", + "id": 1321, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 1321, + "result": { + "range": { + "start": { + "line": 3, + "character": 7 + }, + "end": { + "line": 3, + "character": 15 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 14, + "character": 22 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 14, - "character": 34 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1434, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 1434, - "result": { - "range": { - "start": { - "line": 6, - "character": 10 - }, - "end": { - "line": 6, - "character": 18 - } + "jsonrpc": "2.0", + "id": 1422, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 1422, + "result": { + "range": { + "start": { + "line": 4, + "character": 11 + }, + "end": { + "line": 4, + "character": 19 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 14, + "character": 34 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 15, - "character": 27 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1527, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 1527, - "result": { - "range": { - "start": { - "line": 4, - "character": 11 - }, - "end": { - "line": 4, - "character": 19 - } + "jsonrpc": "2.0", + "id": 1434, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 1434, + "result": { + "range": { + "start": { + "line": 6, + "character": 10 + }, + "end": { + "line": 6, + "character": 18 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 15, + "character": 27 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 15, - "character": 30 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1530, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 1530, - "result": { - "range": { - "start": { - "line": 5, - "character": 6 - }, - "end": { - "line": 5, - "character": 7 - } + "jsonrpc": "2.0", + "id": 1527, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 1527, + "result": { + "range": { + "start": { + "line": 4, + "character": 11 + }, + "end": { + "line": 4, + "character": 19 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 15, + "character": 30 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 17, - "character": 38 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1738, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 1738, - "result": { - "range": { - "start": { - "line": 8, - "character": 11 - }, - "end": { - "line": 8, - "character": 18 - } + "jsonrpc": "2.0", + "id": 1530, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 1530, + "result": { + "range": { + "start": { + "line": 5, + "character": 6 + }, + "end": { + "line": 5, + "character": 7 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 17, + "character": 38 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 18, - "character": 38 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 1838, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 1838, - "result": { - "range": { - "start": { - "line": 10, - "character": 11 - }, - "end": { - "line": 10, - "character": 17 - } + "jsonrpc": "2.0", + "id": 1738, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 1738, + "result": { + "range": { + "start": { + "line": 8, + "character": 11 + }, + "end": { + "line": 8, + "character": 18 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 18, + "character": 38 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{imported.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 20, - "character": 9 - }, - "textDocument": { - "uri": "$URI{navigation.gpr}" - } - }, - "jsonrpc": "2.0", - "id": 209, - "method": "textDocument/definition" - }, - "wait": [ - { - "id": 209, - "result": { - "range": { - "start": { - "line": 4, - "character": 3 - }, - "end": { - "line": 4, - "character": 4 - } + "jsonrpc": "2.0", + "id": 1838, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 1838, + "result": { + "range": { + "start": { + "line": 10, + "character": 11 + }, + "end": { + "line": 10, + "character": 17 + } + }, + "uri": "$URI{imported.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { + "line": 20, + "character": 9 + }, + "textDocument": { + "uri": "$URI{navigation.gpr}" + } }, - "uri": "$URI{navigation.gpr}" - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "shutdown", - "method": "shutdown", - "params": null - }, - "wait": [ - { - "id": "shutdown", - "result": null - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "exit" - }, - "wait": [] - } - }, - { - "stop": { - "exit_code": 0 - } - } -] \ No newline at end of file + "jsonrpc": "2.0", + "id": 209, + "method": "textDocument/definition" + }, + "wait": [ + { + "id": 209, + "result": { + "range": { + "start": { + "line": 4, + "character": 3 + }, + "end": { + "line": 4, + "character": 4 + } + }, + "uri": "$URI{navigation.gpr}" + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "shutdown", + "method": "shutdown", + "params": null + }, + "wait": [ + { + "id": "shutdown", + "result": null + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "exit" + }, + "wait": [] + } + }, + { + "stop": { + "exit_code": 0 + } + } +] diff --git a/testsuite/gpr_lsp/gpr2_assertions/test.json b/testsuite/gpr_lsp/gpr2_assertions/test.json index bba9dcc07..f1ef44104 100644 --- a/testsuite/gpr_lsp/gpr2_assertions/test.json +++ b/testsuite/gpr_lsp/gpr2_assertions/test.json @@ -1,188 +1,181 @@ [ - { - "comment": [ - "test gpr2 assertions handling" - ] - }, - { - "start": { - "cmd": [ - "${ALS}", - "--language-gpr" - ] - } - }, - { - "send": { - "request": { - "params": { - "processId": 30612, - "capabilities": { - "workspace": { - "applyEdit": false + { + "comment": ["test gpr2 assertions handling"] + }, + { + "start": { + "cmd": ["${ALS}", "--language-gpr"] + } + }, + { + "send": { + "request": { + "params": { + "processId": 30612, + "capabilities": { + "workspace": { + "applyEdit": false + } + }, + "rootUri": "$URI{.}" + }, + "jsonrpc": "2.0", + "id": 1, + "method": "initialize" + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 1, + "result": { + "capabilities": { + "textDocumentSync": { + "openClose": true, + "change": 1 + }, + "completionProvider": { + "triggerCharacters": [" ", "."], + "resolveProvider": true + }, + "hoverProvider": true, + "definitionProvider": true, + "documentSymbolProvider": {} + } + } } - }, - "rootUri": "$URI{.}" - }, - "jsonrpc": "2.0", - "id": 1, - "method": "initialize" - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 1, - "result": { - "capabilities": { - "textDocumentSync": { - "openClose": true, - "change": 1 - }, - "completionProvider": { - "triggerCharacters": [ - " " - ], - "resolveProvider": true - }, - "hoverProvider": true, - "definitionProvider": true, - "documentSymbolProvider": {} + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "initialized" + }, + "wait": [] + } + }, + { + "send": { + "request": { + "params": { + "textDocument": { + "text": "project prj is for Warning_Message use \"\"; end prj;", + "version": 0, + "uri": "$URI{prj.gpr}", + "languageId": "Gpr" + } + }, + "jsonrpc": "2.0", + "method": "textDocument/didOpen" + }, + "wait": [ + { + "method": "textDocument/publishDiagnostics", + "params": { + "uri": "$URI{prj.gpr}", + "diagnostics": [ + { + "range": { + "start": { + "line": 0, + "character": 0 + }, + "end": { + "line": 0, + "character": 0 + } + }, + "severity": 1, + "message": "GPR parser unexpected ADA.ASSERTIONS.ASSERTION_ERROR DYNAMIC_PREDICATE failed at gpr2-message.adb:23" + } + ] + } } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "initialized" - }, - "wait": [] - } - }, - { - "send": { - "request": { - "params": { - "textDocument": { - "text": "project prj is for Warning_Message use \"\"; end prj;", - "version": 0, - "uri": "$URI{prj.gpr}", - "languageId": "Gpr" - } - }, - "jsonrpc": "2.0", - "method": "textDocument/didOpen" - }, - "wait": [ - { - "method": "textDocument/publishDiagnostics", - "params": { - "uri": "$URI{prj.gpr}", - "diagnostics": [ - { - "range": { - "start": { - "line": 0, - "character": 0 - }, - "end": { - "line": 0, - "character": 0 + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "textDocument/didChange", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}", + "version": 1 + }, + "contentChanges": [ + { + "range": { + "start": { + "line": 0, + "character": 40 + }, + "end": { + "line": 0, + "character": 40 + } + }, + "text": "gpr2's parser warning" } - }, - "severity": 1, - "message": "GPR parser unexpected ADA.ASSERTIONS.ASSERTION_ERROR DYNAMIC_PREDICATE failed at gpr2-message.adb:23" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "textDocument/didChange", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}", - "version": 1 - }, - "contentChanges": [ + ] + } + }, + "wait": [ { - "range": { - "start": { - "line": 0, - "character": 40 - }, - "end": { - "line": 0, - "character": 40 - } - }, - "text": "gpr2's parser warning" + "method": "textDocument/publishDiagnostics", + "params": { + "uri": "$URI{prj.gpr}", + "diagnostics": [ + { + "range": { + "start": { + "line": 0, + "character": 19 + }, + "end": { + "line": 0, + "character": 19 + } + }, + "severity": 2, + "message": "gpr2's parser warning" + } + ] + } } - ] - } - }, - "wait": [ - { - "method": "textDocument/publishDiagnostics", - "params": { - "uri": "$URI{prj.gpr}", - "diagnostics": [ - { - "range": { - "start": { - "line": 0, - "character": 19 - }, - "end": { - "line": 0, - "character": 19 - } - }, - "severity": 2, - "message": "gpr2's parser warning" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "shutdown", - "method": "shutdown", - "params": null - }, - "wait": [ - { - "id": "shutdown", - "result": null - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "exit" - }, - "wait": [] - } - }, - { - "stop": { - "exit_code": 0 - } - } -] \ No newline at end of file + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "shutdown", + "method": "shutdown", + "params": null + }, + "wait": [ + { + "id": "shutdown", + "result": null + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "exit" + }, + "wait": [] + } + }, + { + "stop": { + "exit_code": 0 + } + } +] diff --git a/testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.json b/testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.json index a2571627e..20d107f2d 100644 --- a/testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.json +++ b/testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.json @@ -1,136 +1,129 @@ [ - { - "comment": [ - "test gpr unexpected exception handling" - ] - }, - { - "start": { - "cmd": [ - "${ALS}", - "--language-gpr" - ] - } - }, - { - "send": { - "request": { - "params": { - "processId": 30612, - "capabilities": { - "workspace": { - "applyEdit": false + { + "comment": ["test gpr unexpected exception handling"] + }, + { + "start": { + "cmd": ["${ALS}", "--language-gpr"] + } + }, + { + "send": { + "request": { + "params": { + "processId": 30612, + "capabilities": { + "workspace": { + "applyEdit": false + } + }, + "rootUri": "$URI{.}" + }, + "jsonrpc": "2.0", + "id": 1, + "method": "initialize" + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 1, + "result": { + "capabilities": { + "textDocumentSync": { + "openClose": true, + "change": 1 + }, + "completionProvider": { + "triggerCharacters": [" ", "."], + "resolveProvider": true + }, + "hoverProvider": true, + "definitionProvider": true, + "documentSymbolProvider": {} + } + } } - }, - "rootUri": "$URI{.}" - }, - "jsonrpc": "2.0", - "id": 1, - "method": "initialize" - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 1, - "result": { - "capabilities": { - "textDocumentSync": { - "openClose": true, - "change": 1 - }, - "completionProvider": { - "triggerCharacters": [ - " " - ], - "resolveProvider": true - }, - "hoverProvider": true, - "definitionProvider": true, - "documentSymbolProvider": {} + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "initialized" + }, + "wait": [] + } + }, + { + "send": { + "request": { + "params": { + "textDocument": { + "text": "with \"\";\nproject Prj is\n for Source_List_File use \"\";\n for Excluded_Source_List_File use \"\";\n for Warning_Message use \"\";\n package Naming is\n for Body (\"Ada\") use \"\" ;\n for Implementation (\"Ada\") use \"\";\n for Spec (\"Ada\") use \"\";\n for Specification (\"Ada\") use \"\";\n end Naming;\nend Prj;", + "version": 0, + "uri": "$URI{prj.gpr}", + "languageId": "Gpr" + } + }, + "jsonrpc": "2.0", + "method": "textDocument/didOpen" + }, + "wait": [ + { + "jsonrpc": "2.0", + "method": "textDocument/publishDiagnostics", + "params": { + "uri": "$URI{prj.gpr}", + "diagnostics": [ + { + "range": { + "start": { + "line": 0, + "character": 0 + }, + "end": { + "line": 0, + "character": 0 + } + }, + "severity": 1, + "message": "GPR parser unexpected ADA.ASSERTIONS.ASSERTION_ERROR DYNAMIC_PREDICATE failed at gpr2-project-parser.adb:83" + } + ] + } } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "initialized" - }, - "wait": [] - } - }, - { - "send": { - "request": { - "params": { - "textDocument": { - "text": "with \"\";\nproject Prj is\n for Source_List_File use \"\";\n for Excluded_Source_List_File use \"\";\n for Warning_Message use \"\";\n package Naming is\n for Body (\"Ada\") use \"\" ;\n for Implementation (\"Ada\") use \"\";\n for Spec (\"Ada\") use \"\";\n for Specification (\"Ada\") use \"\";\n end Naming;\nend Prj;", - "version": 0, - "uri": "$URI{prj.gpr}", - "languageId": "Gpr" - } - }, - "jsonrpc": "2.0", - "method": "textDocument/didOpen" - }, - "wait": [ - { - "jsonrpc": "2.0", - "method": "textDocument/publishDiagnostics", - "params": { - "uri": "$URI{prj.gpr}", - "diagnostics": [ - { - "range": { - "start": { - "line": 0, - "character": 0 - }, - "end": { - "line": 0, - "character": 0 - } - }, - "severity": 1, - "message": "GPR parser unexpected ADA.ASSERTIONS.ASSERTION_ERROR DYNAMIC_PREDICATE failed at gpr2-project-parser.adb:83" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "shutdown", - "method": "shutdown", - "params": null - }, - "wait": [ - { - "id": "shutdown", - "result": null - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "exit" - }, - "wait": [] - } - }, - { - "stop": { - "exit_code": 0 - } - } -] \ No newline at end of file + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "shutdown", + "method": "shutdown", + "params": null + }, + "wait": [ + { + "id": "shutdown", + "result": null + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "exit" + }, + "wait": [] + } + }, + { + "stop": { + "exit_code": 0 + } + } +] diff --git a/testsuite/gpr_lsp/import_using_space_string/test.json b/testsuite/gpr_lsp/import_using_space_string/test.json index 9198c98e9..c28f346c7 100644 --- a/testsuite/gpr_lsp/import_using_space_string/test.json +++ b/testsuite/gpr_lsp/import_using_space_string/test.json @@ -1,254 +1,244 @@ [ - { - "comment": [ - "check with \" \"; support" - ] - }, - { - "start": { - "cmd": [ - "${ALS}", - "--language-gpr" - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "init", - "method": "initialize", - "params": { - "processId": 441587, - "rootUri": "$URI{.}", - "capabilities": { - "workspace": { - "applyEdit": true, - "workspaceEdit": {}, - "didChangeConfiguration": {}, - "didChangeWatchedFiles": {}, - "executeCommand": {} - }, - "textDocument": { - "synchronization": {}, - "completion": { - "dynamicRegistration": true, - "completionItem": { - "snippetSupport": true, - "documentationFormat": [ - "plaintext", - "markdown" + { + "comment": ["check with \" \"; support"] + }, + { + "start": { + "cmd": ["${ALS}", "--language-gpr"] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "init", + "method": "initialize", + "params": { + "processId": 441587, + "rootUri": "$URI{.}", + "capabilities": { + "workspace": { + "applyEdit": true, + "workspaceEdit": {}, + "didChangeConfiguration": {}, + "didChangeWatchedFiles": {}, + "executeCommand": {} + }, + "textDocument": { + "synchronization": {}, + "completion": { + "dynamicRegistration": true, + "completionItem": { + "snippetSupport": true, + "documentationFormat": ["plaintext", "markdown"] + } + }, + "hover": {}, + "definition": {}, + "documentSymbol": { + "hierarchicalDocumentSymbolSupport": true + } + } + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": "init", + "result": { + "capabilities": { + "textDocumentSync": { + "openClose": true, + "change": 1 + }, + "completionProvider": { + "triggerCharacters": [" ", "."], + "resolveProvider": true + }, + "hoverProvider": true, + "definitionProvider": true, + "documentSymbolProvider": {} + } + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "initialized" + }, + "wait": [] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "textDocument/didOpen", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}", + "languageId": "gpr", + "version": 1, + "text": "with \" \";\nproject Prj is\nend Prj;" + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "method": "textDocument/publishDiagnostics", + "params": { + "uri": "$URI{prj.gpr}", + "diagnostics": [ + { + "range": { + "start": { + "line": 0, + "character": 5 + }, + "end": { + "line": 0, + "character": 5 + } + }, + "severity": 1, + "message": "imported project file \" .gpr\" not found" + } ] - } - }, - "hover": {}, - "definition": {}, - "documentSymbol": { - "hierarchicalDocumentSymbolSupport": true - } + } } - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": "init", - "result": { - "capabilities": { - "textDocumentSync": { - "openClose": true, - "change": 1 - }, - "completionProvider": { - "triggerCharacters": [ - " " - ], - "resolveProvider": true - }, - "hoverProvider": true, - "definitionProvider": true, - "documentSymbolProvider": {} + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "textDocument/documentSymbol_prj_1", + "method": "textDocument/documentSymbol", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + } } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "initialized" - }, - "wait": [] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "textDocument/didOpen", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}", - "languageId": "gpr", - "version": 1, - "text": "with \" \";\nproject Prj is\nend Prj;" - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "method": "textDocument/publishDiagnostics", - "params": { - "uri": "$URI{prj.gpr}", - "diagnostics": [ - { - "range": { - "start": { - "line": 0, - "character": 5 - }, - "end": { - "line": 0, - "character": 5 - } - }, - "severity": 1, - "message": "imported project file \" .gpr\" not found" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "textDocument/documentSymbol_prj_1", - "method": "textDocument/documentSymbol", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": "textDocument/documentSymbol_prj_1", - "result": [ + }, + "wait": [ { - "name": "with clauses", - "kind": 3, - "range": { - "start": { - "line": 0, - "character": 0 - }, - "end": { - "line": 0, - "character": 0 - } - }, - "selectionRange": { - "start": { - "line": 0, - "character": 0 - }, - "end": { - "line": 0, - "character": 0 - } - }, - "children": [ - { - "name": " ", - "kind": 3, - "range": { - "start": { - "line": 0, - "character": 5 - }, - "end": { - "line": 0, - "character": 8 - } + "jsonrpc": "2.0", + "id": "textDocument/documentSymbol_prj_1", + "result": [ + { + "name": "with clauses", + "kind": 3, + "range": { + "start": { + "line": 0, + "character": 0 + }, + "end": { + "line": 0, + "character": 0 + } + }, + "selectionRange": { + "start": { + "line": 0, + "character": 0 + }, + "end": { + "line": 0, + "character": 0 + } + }, + "children": [ + { + "name": " ", + "kind": 3, + "range": { + "start": { + "line": 0, + "character": 5 + }, + "end": { + "line": 0, + "character": 8 + } + }, + "selectionRange": { + "start": { + "line": 0, + "character": 5 + }, + "end": { + "line": 0, + "character": 8 + } + } + } + ] }, - "selectionRange": { - "start": { - "line": 0, - "character": 5 - }, - "end": { - "line": 0, - "character": 8 - } + { + "name": "Prj", + "kind": 2, + "range": { + "start": { + "line": 1, + "character": 0 + }, + "end": { + "line": 1, + "character": 7 + } + }, + "selectionRange": { + "start": { + "line": 1, + "character": 0 + }, + "end": { + "line": 1, + "character": 7 + } + } } - } - ] - }, + ] + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "shutdown", + "method": "shutdown", + "params": null + }, + "wait": [ { - "name": "Prj", - "kind": 2, - "range": { - "start": { - "line": 1, - "character": 0 - }, - "end": { - "line": 1, - "character": 7 - } - }, - "selectionRange": { - "start": { - "line": 1, - "character": 0 - }, - "end": { - "line": 1, - "character": 7 - } - } + "id": "shutdown", + "result": null } - ] - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "shutdown", - "method": "shutdown", - "params": null - }, - "wait": [ - { - "id": "shutdown", - "result": null - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "exit" - }, - "wait": [] - } - }, - { - "stop": { - "exit_code": 0 - } - } -] \ No newline at end of file + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "exit" + }, + "wait": [] + } + }, + { + "stop": { + "exit_code": 0 + } + } +] diff --git a/testsuite/gpr_lsp/imported_project_errors_handling/test.json b/testsuite/gpr_lsp/imported_project_errors_handling/test.json index 060459269..f00757149 100644 --- a/testsuite/gpr_lsp/imported_project_errors_handling/test.json +++ b/testsuite/gpr_lsp/imported_project_errors_handling/test.json @@ -1,197 +1,190 @@ [ - { - "comment": [ - "test imported projects errors handling" - ] - }, - { - "start": { - "cmd": [ - "${ALS}", - "--language-gpr" - ] - } - }, - { - "send": { - "request": { - "params": { - "processId": 30612, - "capabilities": { - "workspace": { - "applyEdit": false + { + "comment": ["test imported projects errors handling"] + }, + { + "start": { + "cmd": ["${ALS}", "--language-gpr"] + } + }, + { + "send": { + "request": { + "params": { + "processId": 30612, + "capabilities": { + "workspace": { + "applyEdit": false + } + }, + "rootUri": "$URI{.}" + }, + "jsonrpc": "2.0", + "id": 1, + "method": "initialize" + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 1, + "result": { + "capabilities": { + "textDocumentSync": { + "openClose": true, + "change": 1 + }, + "completionProvider": { + "triggerCharacters": [" ", "."], + "resolveProvider": true + }, + "hoverProvider": true, + "definitionProvider": true, + "documentSymbolProvider": {} + } + } } - }, - "rootUri": "$URI{.}" - }, - "jsonrpc": "2.0", - "id": 1, - "method": "initialize" - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 1, - "result": { - "capabilities": { - "textDocumentSync": { - "openClose": true, - "change": 1 - }, - "completionProvider": { - "triggerCharacters": [ - " " - ], - "resolveProvider": true - }, - "hoverProvider": true, - "definitionProvider": true, - "documentSymbolProvider": {} + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "initialized" + }, + "wait": [] + } + }, + { + "send": { + "request": { + "params": { + "textDocument": { + "text": "with \"imported\", \"\"; project prj is end prj;", + "version": 0, + "uri": "$URI{prj.gpr}", + "languageId": "Gpr" + } + }, + "jsonrpc": "2.0", + "method": "textDocument/didOpen" + }, + "wait": [ + { + "method": "textDocument/publishDiagnostics", + "params": { + "uri": "$URI{prj.gpr}", + "diagnostics": [ + { + "range": { + "start": { + "line": 0, + "character": 0 + }, + "end": { + "line": 0, + "character": 0 + } + }, + "severity": 1, + "message": "GPR parser unexpected ADA.ASSERTIONS.ASSERTION_ERROR DYNAMIC_PREDICATE failed at gpr2-project-parser.adb:83" + } + ] + } } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "initialized" - }, - "wait": [] - } - }, - { - "send": { - "request": { - "params": { - "textDocument": { - "text": "with \"imported\", \"\"; project prj is end prj;", - "version": 0, - "uri": "$URI{prj.gpr}", - "languageId": "Gpr" - } - }, - "jsonrpc": "2.0", - "method": "textDocument/didOpen" - }, - "wait": [ - { - "method": "textDocument/publishDiagnostics", - "params": { - "uri": "$URI{prj.gpr}", - "diagnostics": [ - { - "range": { - "start": { - "line": 0, - "character": 0 - }, - "end": { - "line": 0, - "character": 0 + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "textDocument/didChange", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}", + "version": 1 + }, + "contentChanges": [ + { + "range": { + "start": { + "line": 0, + "character": 18 + }, + "end": { + "line": 0, + "character": 18 + } + }, + "text": "imported1" } - }, - "severity": 1, - "message": "GPR parser unexpected ADA.ASSERTIONS.ASSERTION_ERROR DYNAMIC_PREDICATE failed at gpr2-project-parser.adb:83" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "textDocument/didChange", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}", - "version": 1 - }, - "contentChanges": [ + ] + } + }, + "wait": [ { - "range": { - "start": { - "line": 0, - "character": 18 - }, - "end": { - "line": 0, - "character": 18 - } - }, - "text": "imported1" + "jsonrpc": "2.0", + "method": "textDocument/publishDiagnostics", + "params": { + "uri": "$URI{prj.gpr}", + "diagnostics": [] + } + }, + { + "jsonrpc": "2.0", + "method": "textDocument/publishDiagnostics", + "params": { + "uri": "$URI{imported1.gpr}", + "diagnostics": [ + { + "range": { + "start": { + "line": 0, + "character": 0 + }, + "end": { + "line": 0, + "character": 0 + } + }, + "severity": 1, + "message": "duplicate project name \"Imported\" in \"$FILE{imported.gpr}\"" + } + ] + } } - ] - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "method": "textDocument/publishDiagnostics", - "params": { - "uri": "$URI{prj.gpr}", - "diagnostics": [] - } - }, - { - "jsonrpc": "2.0", - "method": "textDocument/publishDiagnostics", - "params": { - "uri": "$URI{imported1.gpr}", - "diagnostics": [ - { - "range": { - "start": { - "line": 0, - "character": 0 - }, - "end": { - "line": 0, - "character": 0 - } - }, - "severity": 1, - "message": "duplicate project name \"Imported\" in \"$FILE{imported.gpr}\"" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "shutdown", - "method": "shutdown", - "params": null - }, - "wait": [ - { - "id": "shutdown", - "result": null - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "exit" - }, - "wait": [] - } - }, - { - "stop": { - "exit_code": 0 - } - } -] \ No newline at end of file + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "shutdown", + "method": "shutdown", + "params": null + }, + "wait": [ + { + "id": "shutdown", + "result": null + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "exit" + }, + "wait": [] + } + }, + { + "stop": { + "exit_code": 0 + } + } +] diff --git a/testsuite/gpr_lsp/invalid_file_name_support/test.json b/testsuite/gpr_lsp/invalid_file_name_support/test.json index d5fe02a31..0f5972d62 100644 --- a/testsuite/gpr_lsp/invalid_file_name_support/test.json +++ b/testsuite/gpr_lsp/invalid_file_name_support/test.json @@ -1,466 +1,456 @@ [ - { - "comment": [ - "test invalid filename support" - ] - }, - { - "start": { - "cmd": [ - "${ALS}", - "--language-gpr" - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "init", - "method": "initialize", - "params": { - "processId": 441587, - "rootUri": "$URI{.}", - "capabilities": { - "workspace": { - "applyEdit": true, - "workspaceEdit": {}, - "didChangeConfiguration": {}, - "didChangeWatchedFiles": {}, - "executeCommand": {} - }, - "textDocument": { - "synchronization": {}, - "completion": { - "dynamicRegistration": true, - "completionItem": { - "snippetSupport": true, - "documentationFormat": [ - "plaintext", - "markdown" + { + "comment": ["test invalid filename support"] + }, + { + "start": { + "cmd": ["${ALS}", "--language-gpr"] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "init", + "method": "initialize", + "params": { + "processId": 441587, + "rootUri": "$URI{.}", + "capabilities": { + "workspace": { + "applyEdit": true, + "workspaceEdit": {}, + "didChangeConfiguration": {}, + "didChangeWatchedFiles": {}, + "executeCommand": {} + }, + "textDocument": { + "synchronization": {}, + "completion": { + "dynamicRegistration": true, + "completionItem": { + "snippetSupport": true, + "documentationFormat": ["plaintext", "markdown"] + } + }, + "hover": {}, + "definition": {}, + "documentSymbol": { + "hierarchicalDocumentSymbolSupport": true + } + } + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": "init", + "result": { + "capabilities": { + "textDocumentSync": { + "openClose": true, + "change": 1 + }, + "completionProvider": { + "triggerCharacters": [" ", "."], + "resolveProvider": true + }, + "hoverProvider": true, + "definitionProvider": true, + "documentSymbolProvider": {} + } + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "initialized" + }, + "wait": [] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "textDocument/didOpen", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}", + "languageId": "gpr", + "version": 1, + "text": "with \" \";\naggregate project prj extends \" \" is\nfor Project_Files use (\" \");\nend prj;\n" + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "method": "textDocument/publishDiagnostics", + "params": { + "uri": "$URI{prj.gpr}", + "diagnostics": [ + { + "range": { + "start": { + "line": 0, + "character": 5 + }, + "end": { + "line": 0, + "character": 5 + } + }, + "severity": 1, + "message": "imported project file \" .gpr\" not found" + }, + { + "range": { + "start": { + "line": 1, + "character": 22 + }, + "end": { + "line": 1, + "character": 22 + } + }, + "severity": 1, + "message": "extended project file \" .gpr\" not found" + } ] - } - }, - "hover": {}, - "definition": {}, - "documentSymbol": { - "hierarchicalDocumentSymbolSupport": true - } + } } - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": "init", - "result": { - "capabilities": { - "textDocumentSync": { - "openClose": true, - "change": 1 - }, - "completionProvider": { - "triggerCharacters": [ - " " - ], - "resolveProvider": true - }, - "hoverProvider": true, - "definitionProvider": true, - "documentSymbolProvider": {} + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "textDocument/documentSymbol_prj_1", + "method": "textDocument/documentSymbol", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + } } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "initialized" - }, - "wait": [] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "textDocument/didOpen", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}", - "languageId": "gpr", - "version": 1, - "text": "with \" \";\naggregate project prj extends \" \" is\nfor Project_Files use (\" \");\nend prj;\n" - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "method": "textDocument/publishDiagnostics", - "params": { - "uri": "$URI{prj.gpr}", - "diagnostics": [ - { - "range": { - "start": { - "line": 0, - "character": 5 - }, - "end": { - "line": 0, - "character": 5 - } - }, - "severity": 1, - "message": "imported project file \" .gpr\" not found" - }, - { - "range": { - "start": { - "line": 1, - "character": 22 + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": "textDocument/documentSymbol_prj_1", + "result": [ + { + "name": "with clauses", + "kind": 3, + "range": { + "start": { + "line": 0, + "character": 0 + }, + "end": { + "line": 0, + "character": 0 + } + }, + "selectionRange": { + "start": { + "line": 0, + "character": 0 + }, + "end": { + "line": 0, + "character": 0 + } + }, + "children": [ + { + "name": " ", + "kind": 3, + "range": { + "start": { + "line": 0, + "character": 5 + }, + "end": { + "line": 0, + "character": 9 + } + }, + "selectionRange": { + "start": { + "line": 0, + "character": 5 + }, + "end": { + "line": 0, + "character": 9 + } + } + } + ] }, - "end": { - "line": 1, - "character": 22 + { + "name": "prj", + "kind": 2, + "range": { + "start": { + "line": 1, + "character": 10 + }, + "end": { + "line": 1, + "character": 17 + } + }, + "selectionRange": { + "start": { + "line": 1, + "character": 10 + }, + "end": { + "line": 1, + "character": 17 + } + }, + "children": [ + { + "name": "Project_Files", + "kind": 7, + "range": { + "start": { + "line": 2, + "character": 4 + }, + "end": { + "line": 2, + "character": 17 + } + }, + "selectionRange": { + "start": { + "line": 2, + "character": 4 + }, + "end": { + "line": 2, + "character": 17 + } + } + } + ] } - }, - "severity": 1, - "message": "extended project file \" .gpr\" not found" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "textDocument/documentSymbol_prj_1", - "method": "textDocument/documentSymbol", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": "textDocument/documentSymbol_prj_1", - "result": [ - { - "name": "with clauses", - "kind": 3, - "range": { - "start": { - "line": 0, - "character": 0 - }, - "end": { - "line": 0, - "character": 0 - } - }, - "selectionRange": { - "start": { + ] + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "textDocument/hover_prj_0_7", + "method": "textDocument/hover", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { "line": 0, - "character": 0 - }, - "end": { + "character": 7 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": "textDocument/hover_prj_0_7", + "result": null + } + ] + } + }, + { + "send": { + "request": { + "params": { + "position": { "line": 0, - "character": 0 - } - }, - "children": [ - { - "name": " ", - "kind": 3, - "range": { - "start": { - "line": 0, - "character": 5 - }, - "end": { - "line": 0, - "character": 9 - } - }, - "selectionRange": { - "start": { - "line": 0, - "character": 5 - }, - "end": { - "line": 0, - "character": 9 - } - } - } - ] + "character": 7 + }, + "textDocument": { + "uri": "$URI{prj.gpr}" + } }, + "jsonrpc": "2.0", + "id": "definition1", + "method": "textDocument/definition" + }, + "wait": [ { - "name": "prj", - "kind": 2, - "range": { - "start": { - "line": 1, - "character": 10 - }, - "end": { - "line": 1, - "character": 17 - } - }, - "selectionRange": { - "start": { + "id": "definition1", + "result": [] + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "textDocument/hover_prj_1_32", + "method": "textDocument/hover", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { "line": 1, - "character": 10 - }, - "end": { + "character": 32 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": "textDocument/hover_prj_1_32", + "result": null + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "textDocument/definition_prj_1_32", + "method": "textDocument/definition", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { "line": 1, - "character": 17 - } - }, - "children": [ - { - "name": "Project_Files", - "kind": 7, - "range": { - "start": { - "line": 2, - "character": 4 - }, - "end": { - "line": 2, - "character": 17 - } - }, - "selectionRange": { - "start": { - "line": 2, - "character": 4 - }, - "end": { - "line": 2, - "character": 17 - } - } - } - ] + "character": 32 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": "textDocument/definition_prj_1_32", + "result": [] + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "textDocument/hover_prj_2_25", + "method": "textDocument/hover", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 2, + "character": 25 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": "textDocument/hover_prj_2_25", + "result": null + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "textDocument/definition_prj_2_25", + "method": "textDocument/definition", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + }, + "position": { + "line": 2, + "character": 25 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": "textDocument/definition_prj_2_25", + "result": [] + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "textDocument/didClose", + "params": { + "textDocument": { + "uri": "$URI{prj.gpr}" + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "method": "textDocument/publishDiagnostics", + "params": { + "uri": "$URI{prj.gpr}", + "diagnostics": [] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "shutdown", + "method": "shutdown", + "params": null + }, + "wait": [ + { + "id": "shutdown", + "result": null } - ] - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "textDocument/hover_prj_0_7", - "method": "textDocument/hover", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 0, - "character": 7 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": "textDocument/hover_prj_0_7", - "result": null - } - ] - } - }, - { - "send": { - "request": { - "params": { - "position": { - "line": 0, - "character": 7 - }, - "textDocument": { - "uri": "$URI{prj.gpr}" - } - }, - "jsonrpc": "2.0", - "id": "definition1", - "method": "textDocument/definition" - }, - "wait": [ - { - "id": "definition1", - "result": [] - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "textDocument/hover_prj_1_32", - "method": "textDocument/hover", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 1, - "character": 32 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": "textDocument/hover_prj_1_32", - "result": null - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "textDocument/definition_prj_1_32", - "method": "textDocument/definition", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 1, - "character": 32 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": "textDocument/definition_prj_1_32", - "result": [] - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "textDocument/hover_prj_2_25", - "method": "textDocument/hover", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 2, - "character": 25 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": "textDocument/hover_prj_2_25", - "result": null - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "textDocument/definition_prj_2_25", - "method": "textDocument/definition", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - }, - "position": { - "line": 2, - "character": 25 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": "textDocument/definition_prj_2_25", - "result": [] - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "textDocument/didClose", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}" - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "method": "textDocument/publishDiagnostics", - "params": { - "uri": "$URI{prj.gpr}", - "diagnostics": [] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "shutdown", - "method": "shutdown", - "params": null - }, - "wait": [ - { - "id": "shutdown", - "result": null - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "exit" - }, - "wait": [] - } - }, - { - "stop": { - "exit_code": 0 - } - } -] \ No newline at end of file + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "exit" + }, + "wait": [] + } + }, + { + "stop": { + "exit_code": 0 + } + } +] diff --git a/testsuite/gpr_lsp/no_symbol_with_empty_name/test.json b/testsuite/gpr_lsp/no_symbol_with_empty_name/test.json index 4eff24bb0..8c20aaadc 100644 --- a/testsuite/gpr_lsp/no_symbol_with_empty_name/test.json +++ b/testsuite/gpr_lsp/no_symbol_with_empty_name/test.json @@ -1,236 +1,229 @@ [ - { - "comment": [ - "with \"\"; statement support" - ] - }, - { - "start": { - "cmd": [ - "${ALS}", - "--language-gpr" - ] - } - }, - { - "send": { - "request": { - "params": { - "processId": 30612, - "capabilities": { - "workspace": { - "applyEdit": false + { + "comment": ["with \"\"; statement support"] + }, + { + "start": { + "cmd": ["${ALS}", "--language-gpr"] + } + }, + { + "send": { + "request": { + "params": { + "processId": 30612, + "capabilities": { + "workspace": { + "applyEdit": false + }, + "textDocument": { + "documentSymbol": { + "hierarchicalDocumentSymbolSupport": true + } + } + }, + "rootUri": "$URI{.}" }, - "textDocument": { - "documentSymbol": { - "hierarchicalDocumentSymbolSupport": true - } + "jsonrpc": "2.0", + "id": 1, + "method": "initialize" + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": 1, + "result": { + "capabilities": { + "textDocumentSync": { + "openClose": true, + "change": 1 + }, + "completionProvider": { + "triggerCharacters": [" ", "."], + "resolveProvider": true + }, + "hoverProvider": true, + "definitionProvider": true, + "documentSymbolProvider": {} + } + } } - }, - "rootUri": "$URI{.}" - }, - "jsonrpc": "2.0", - "id": 1, - "method": "initialize" - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 1, - "result": { - "capabilities": { - "textDocumentSync": { - "openClose": true, - "change": 1 - }, - "completionProvider": { - "triggerCharacters": [ - " " - ], - "resolveProvider": true - }, - "hoverProvider": true, - "definitionProvider": true, - "documentSymbolProvider": {} + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "initialized" + }, + "wait": [] + } + }, + { + "send": { + "request": { + "params": { + "textDocument": { + "text": "with\"\";project P is end P;", + "version": 0, + "uri": "$URI{p.gpr}", + "languageId": "Gpr" + } + }, + "jsonrpc": "2.0", + "method": "textDocument/didOpen" + }, + "wait": [ + { + "method": "textDocument/publishDiagnostics", + "params": { + "uri": "$URI{p.gpr}", + "diagnostics": [ + { + "range": { + "start": { + "line": 0, + "character": 0 + }, + "end": { + "line": 0, + "character": 0 + } + }, + "severity": 1, + "message": "GPR parser unexpected ADA.ASSERTIONS.ASSERTION_ERROR DYNAMIC_PREDICATE failed at gpr2-project-parser.adb:83" + } + ] + } } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "initialized" - }, - "wait": [] - } - }, - { - "send": { - "request": { - "params": { - "textDocument": { - "text": "with\"\";project P is end P;", - "version": 0, - "uri": "$URI{p.gpr}", - "languageId": "Gpr" - } - }, - "jsonrpc": "2.0", - "method": "textDocument/didOpen" - }, - "wait": [ - { - "method": "textDocument/publishDiagnostics", - "params": { - "uri": "$URI{p.gpr}", - "diagnostics": [ - { - "range": { - "start": { - "line": 0, - "character": 0 - }, - "end": { - "line": 0, - "character": 0 - } - }, - "severity": 1, - "message": "GPR parser unexpected ADA.ASSERTIONS.ASSERTION_ERROR DYNAMIC_PREDICATE failed at gpr2-project-parser.adb:83" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "textDocument/documentSymbol", - "method": "textDocument/documentSymbol", - "params": { - "textDocument": { - "uri": "$URI{p.gpr}" - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": "textDocument/documentSymbol", - "result": [ + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "textDocument/documentSymbol", + "method": "textDocument/documentSymbol", + "params": { + "textDocument": { + "uri": "$URI{p.gpr}" + } + } + }, + "wait": [ { - "name": "with clauses", - "kind": 3, - "range": { - "start": { - "line": 0, - "character": 0 - }, - "end": { - "line": 0, - "character": 0 - } - }, - "selectionRange": { - "start": { - "line": 0, - "character": 0 - }, - "end": { - "line": 0, - "character": 0 - } - }, - "children": [ - { - "name": " ", - "kind": 3, - "range": { - "start": { - "line": 0, - "character": 4 - }, - "end": { - "line": 0, - "character": 6 - } + "jsonrpc": "2.0", + "id": "textDocument/documentSymbol", + "result": [ + { + "name": "with clauses", + "kind": 3, + "range": { + "start": { + "line": 0, + "character": 0 + }, + "end": { + "line": 0, + "character": 0 + } + }, + "selectionRange": { + "start": { + "line": 0, + "character": 0 + }, + "end": { + "line": 0, + "character": 0 + } + }, + "children": [ + { + "name": " ", + "kind": 3, + "range": { + "start": { + "line": 0, + "character": 4 + }, + "end": { + "line": 0, + "character": 6 + } + }, + "selectionRange": { + "start": { + "line": 0, + "character": 4 + }, + "end": { + "line": 0, + "character": 6 + } + } + } + ] }, - "selectionRange": { - "start": { - "line": 0, - "character": 4 - }, - "end": { - "line": 0, - "character": 6 - } + { + "name": "P", + "kind": 2, + "range": { + "start": { + "line": 0, + "character": 7 + }, + "end": { + "line": 0, + "character": 14 + } + }, + "selectionRange": { + "start": { + "line": 0, + "character": 7 + }, + "end": { + "line": 0, + "character": 14 + } + } } - } - ] - }, + ] + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "shutdown", + "method": "shutdown", + "params": null + }, + "wait": [ { - "name": "P", - "kind": 2, - "range": { - "start": { - "line": 0, - "character": 7 - }, - "end": { - "line": 0, - "character": 14 - } - }, - "selectionRange": { - "start": { - "line": 0, - "character": 7 - }, - "end": { - "line": 0, - "character": 14 - } - } + "id": "shutdown", + "result": null } - ] - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "shutdown", - "method": "shutdown", - "params": null - }, - "wait": [ - { - "id": "shutdown", - "result": null - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "exit" - }, - "wait": [] - } - }, - { - "stop": { - "exit_code": 0 - } - } -] \ No newline at end of file + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "exit" + }, + "wait": [] + } + }, + { + "stop": { + "exit_code": 0 + } + } +] diff --git a/testsuite/gpr_lsp/project_config.alire/test.json b/testsuite/gpr_lsp/project_config.alire/test.json index b481abb7c..c4469913d 100644 --- a/testsuite/gpr_lsp/project_config.alire/test.json +++ b/testsuite/gpr_lsp/project_config.alire/test.json @@ -1,185 +1,181 @@ [ - { - "comment": [ - "This test check language server is able to handle a project file", - "using alr and alire.toml." - ] - }, - { - "prepend_to_env": { - "PATH": "${DIR}" - } - }, - { - "start": { - "cmd": [ - "${ALS}", - "--language-gpr" + { + "comment": [ + "This test check language server is able to handle a project file", + "using alr and alire.toml." ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": 0, - "method": "initialize", - "params": { - "processId": 1, - "rootUri": "$URI{.}", - "capabilities": {} - } - }, - "wait": [ - { - "id": 0, - "result": { - "capabilities": { - "textDocumentSync": { - "openClose": true, - "change": 1 - }, - "completionProvider": { - "triggerCharacters": [ - " " - ], - "resolveProvider": true - }, - "hoverProvider": true, - "declarationProvider": true, - "definitionProvider": true, - "documentSymbolProvider": {} + }, + { + "prepend_to_env": { + "PATH": "${DIR}" + } + }, + { + "start": { + "cmd": ["${ALS}", "--language-gpr"] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": 0, + "method": "initialize", + "params": { + "processId": 1, + "rootUri": "$URI{.}", + "capabilities": {} } - } - } - ] - } - }, - { + }, + "wait": [ + { + "id": 0, + "result": { + "capabilities": { + "textDocumentSync": { + "openClose": true, + "change": 1 + }, + "completionProvider": { + "triggerCharacters": [" ", "."], + "resolveProvider": true + }, + "hoverProvider": true, + "declarationProvider": true, + "definitionProvider": true, + "documentSymbolProvider": {} + } + } + } + ] + } + }, + { "send": { "request": { "params": { "textDocument": { - "text": "with \"config/hello_config.gpr\";project Hello is end Hello;", - "version": 0, - "uri": "$URI{hello.gpr}", + "text": "with \"config/hello_config.gpr\";project Hello is end Hello;", + "version": 0, + "uri": "$URI{hello.gpr}", "languageId": "Gpr" } - }, - "jsonrpc": "2.0", + }, + "jsonrpc": "2.0", "method": "textDocument/didOpen" - }, - "wait": [{ - "method": "textDocument/publishDiagnostics", + }, + "wait": [ + { + "method": "textDocument/publishDiagnostics", + "params": { + "uri": "$URI{hello.gpr}", + "diagnostics": [] + } + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "defname-1", + "method": "textDocument/definition", "params": { - "uri": "$URI{hello.gpr}", - "diagnostics": [ - ] + "textDocument": { + "uri": "$URI{hello.gpr}" + }, + "position": { + "line": 0, + "character": 20 + } + } + }, + "wait": [ + { + "jsonrpc": "2.0", + "id": "defname-1", + "result": { + "uri": "$URI{config/hello_config.gpr}", + "range": { + "start": { + "line": 2, + "character": 17 + }, + "end": { + "line": 2, + "character": 29 + } + } + } } - }] + ] } }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "defname-1", - "method": "textDocument/definition", - "params": { - "textDocument": { - "uri": "$URI{hello.gpr}" - }, - "position": { - "line": 0, - "character": 20 - } - } - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": "defname-1", - "result": { - "uri": "$URI{config/hello_config.gpr}", - "range": { - "start": { - "line": 2, - "character": 17 - }, - "end": { - "line": 2, - "character": 29 - } + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "defname-2", + "method": "textDocument/definition", + "params": { + "textDocument": { + "uri": "$URI{config/hello_config.gpr}" + }, + "position": { + "line": 1, + "character": 10 + } } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "defname-2", - "method": "textDocument/definition", - "params": { - "textDocument": { - "uri": "$URI{config/hello_config.gpr}" - }, - "position": { - "line": 1, - "character": 10 - } - } - }, - "wait": [ - { - "id": "defname-2", - "result": { - "uri": "$URI{alire/cache/dependencies/libhello_1.0.1_3c15bc7f/libhello.gpr}", - "range": { - "start": { - "line": 1, - "character": 8 - }, - "end": { - "line": 1, - "character": 16 - } + }, + "wait": [ + { + "id": "defname-2", + "result": { + "uri": "$URI{alire/cache/dependencies/libhello_1.0.1_3c15bc7f/libhello.gpr}", + "range": { + "start": { + "line": 1, + "character": 8 + }, + "end": { + "line": 1, + "character": 16 + } + } + } } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "shutdown", - "method": "shutdown", - "params": null - }, - "wait": [ - { - "id": "shutdown", - "result": null - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "exit" - }, - "wait": [] - } - }, - { - "stop": { - "exit_code": 0 - } - } -] \ No newline at end of file + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "id": "shutdown", + "method": "shutdown", + "params": null + }, + "wait": [ + { + "id": "shutdown", + "result": null + } + ] + } + }, + { + "send": { + "request": { + "jsonrpc": "2.0", + "method": "exit" + }, + "wait": [] + } + }, + { + "stop": { + "exit_code": 0 + } + } +] From 40f66b74fa9d179b0d1b9af32f631c75ac541a8b Mon Sep 17 00:00:00 2001 From: Anthony Leonardo Gracio Date: Thu, 25 Jul 2024 15:54:05 +0000 Subject: [PATCH 2/4] Fix completion for project-defined packages When the user references an imported project before a '.', we should only return the packages that are actually defined in the referenced project, not all ones. For eng/ide/ada_language_server#1398 --- source/gpr/lsp-gpr_completions.adb | 6 +- .../gpr_lsp/completion_references/test.json | 640 +----------------- 2 files changed, 17 insertions(+), 629 deletions(-) diff --git a/source/gpr/lsp-gpr_completions.adb b/source/gpr/lsp-gpr_completions.adb index 58f43d3f3..e6b456974 100644 --- a/source/gpr/lsp-gpr_completions.adb +++ b/source/gpr/lsp-gpr_completions.adb @@ -66,6 +66,9 @@ package body LSP.GPR_Completions is Response : in out LSP.Structures.Completion_Result); -- Handle completion when cursor after "package" keyword or after a project -- reference. + -- If Unexisting_Only is returned, only the packages that have not been + -- defined in the given project file will be returned. Otherwise, only + -- the package that have been defined will be returned. procedure Fill_Type_Completion_Response (File : LSP.GPR_Files.File_Access; @@ -242,8 +245,9 @@ package body LSP.GPR_Completions is for Id of PRP.All_Packages loop declare Item : LSP.Structures.CompletionItem; + Exists_In_File : constant Boolean := File.In_Packages (Id); begin - if (not File.In_Packages (Id) or else not Unexisting_Only) + if (Unexisting_Only xor Exists_In_File) and then PRP.Is_Allowed_In (Id, Kind) and then VSS.Strings.Starts_With (To_Lower (VSS.Strings.To_Virtual_String diff --git a/testsuite/gpr_lsp/completion_references/test.json b/testsuite/gpr_lsp/completion_references/test.json index 9076f25c0..d0fda70df 100644 --- a/testsuite/gpr_lsp/completion_references/test.json +++ b/testsuite/gpr_lsp/completion_references/test.json @@ -174,104 +174,8 @@ "label": "V5" }, { - "label": "Binder", - "data": ["Binder"] - }, - { - "label": "Builder", - "data": ["Builder"] - }, - { - "label": "Clean", - "data": ["Clean"] - }, - { - "label": "Compiler", - "data": ["Compiler"] - }, - { - "label": "Gnatls", - "data": ["Gnatls"] - }, - { - "label": "Install", - "data": ["Install"] - }, - { - "label": "Linker", - "data": ["Linker"] - }, - { - "label": "Naming", - "data": ["Naming"] - }, - { - "label": "Remote", - "data": ["Remote"] - }, - { - "label": "Pretty_Printer", - "data": ["Pretty_Printer"] - }, - { - "label": "Ide", - "data": ["Ide"] - }, - { - "label": "Ant", - "data": ["Ant"] - }, - { - "label": "Make", - "data": ["Make"] - }, - { - "label": "Analyzer", - "data": ["Analyzer"] - }, - { - "label": "Check", - "data": ["Check"] - }, - { - "label": "Codepeer", - "data": ["Codepeer"] - }, - { - "label": "Coverage", - "data": ["Coverage"] - }, - { - "label": "Dsa", - "data": ["Dsa"] - }, - { - "label": "Documentation", - "data": ["Documentation"] - }, - { - "label": "Emulator", - "data": ["Emulator"] - }, - { - "label": "Gnattest", - "data": ["Gnattest"] - }, - { - "label": "Prove", - "data": ["Prove"] - }, - { - "label": "Qgen", - "data": ["Qgen"] - }, - { - "label": "Stack", - "data": ["Stack"] - }, - { - "label": "Stub", - "data": ["Stub"] + "data": ["Compiler"], + "label": "Compiler" }, { "label": "project" @@ -321,104 +225,8 @@ "label": "Imported_Variable" }, { - "label": "Binder", - "data": ["Binder"] - }, - { - "label": "Builder", - "data": ["Builder"] - }, - { - "label": "Clean", - "data": ["Clean"] - }, - { - "label": "Compiler", - "data": ["Compiler"] - }, - { - "label": "Gnatls", - "data": ["Gnatls"] - }, - { - "label": "Install", - "data": ["Install"] - }, - { - "label": "Linker", - "data": ["Linker"] - }, - { - "label": "Naming", - "data": ["Naming"] - }, - { - "label": "Remote", - "data": ["Remote"] - }, - { - "label": "Pretty_Printer", - "data": ["Pretty_Printer"] - }, - { - "label": "Ide", - "data": ["Ide"] - }, - { - "label": "Ant", - "data": ["Ant"] - }, - { - "label": "Make", - "data": ["Make"] - }, - { - "label": "Analyzer", - "data": ["Analyzer"] - }, - { - "label": "Check", - "data": ["Check"] - }, - { - "label": "Codepeer", - "data": ["Codepeer"] - }, - { - "label": "Coverage", - "data": ["Coverage"] - }, - { - "label": "Dsa", - "data": ["Dsa"] - }, - { - "label": "Documentation", - "data": ["Documentation"] - }, - { - "label": "Emulator", - "data": ["Emulator"] - }, - { - "label": "Gnattest", - "data": ["Gnattest"] - }, - { - "label": "Prove", - "data": ["Prove"] - }, - { - "label": "Qgen", - "data": ["Qgen"] - }, - { - "label": "Stack", - "data": ["Stack"] - }, - { - "label": "Stub", - "data": ["Stub"] + "data": ["Compiler"], + "label": "Compiler" } ] } @@ -832,104 +640,8 @@ "label": "V5" }, { - "label": "Binder", - "data": ["Binder"] - }, - { - "label": "Builder", - "data": ["Builder"] - }, - { - "label": "Clean", - "data": ["Clean"] - }, - { - "label": "Compiler", - "data": ["Compiler"] - }, - { - "label": "Gnatls", - "data": ["Gnatls"] - }, - { - "label": "Install", - "data": ["Install"] - }, - { - "label": "Linker", - "data": ["Linker"] - }, - { - "label": "Naming", - "data": ["Naming"] - }, - { - "label": "Remote", - "data": ["Remote"] - }, - { - "label": "Pretty_Printer", - "data": ["Pretty_Printer"] - }, - { - "label": "Ide", - "data": ["Ide"] - }, - { - "label": "Ant", - "data": ["Ant"] - }, - { - "label": "Make", - "data": ["Make"] - }, - { - "label": "Analyzer", - "data": ["Analyzer"] - }, - { - "label": "Check", - "data": ["Check"] - }, - { - "label": "Codepeer", - "data": ["Codepeer"] - }, - { - "label": "Coverage", - "data": ["Coverage"] - }, - { - "label": "Dsa", - "data": ["Dsa"] - }, - { - "label": "Documentation", - "data": ["Documentation"] - }, - { - "label": "Emulator", - "data": ["Emulator"] - }, - { - "label": "Gnattest", - "data": ["Gnattest"] - }, - { - "label": "Prove", - "data": ["Prove"] - }, - { - "label": "Qgen", - "data": ["Qgen"] - }, - { - "label": "Stack", - "data": ["Stack"] - }, - { - "label": "Stub", - "data": ["Stub"] + "data": ["Compiler"], + "label": "Compiler" }, { "label": "project" @@ -1168,104 +880,8 @@ "label": "V5" }, { - "label": "Binder", - "data": ["Binder"] - }, - { - "label": "Builder", - "data": ["Builder"] - }, - { - "label": "Clean", - "data": ["Clean"] - }, - { - "label": "Compiler", - "data": ["Compiler"] - }, - { - "label": "Gnatls", - "data": ["Gnatls"] - }, - { - "label": "Install", - "data": ["Install"] - }, - { - "label": "Linker", - "data": ["Linker"] - }, - { - "label": "Naming", - "data": ["Naming"] - }, - { - "label": "Remote", - "data": ["Remote"] - }, - { - "label": "Pretty_Printer", - "data": ["Pretty_Printer"] - }, - { - "label": "Ide", - "data": ["Ide"] - }, - { - "label": "Ant", - "data": ["Ant"] - }, - { - "label": "Make", - "data": ["Make"] - }, - { - "label": "Analyzer", - "data": ["Analyzer"] - }, - { - "label": "Check", - "data": ["Check"] - }, - { - "label": "Codepeer", - "data": ["Codepeer"] - }, - { - "label": "Coverage", - "data": ["Coverage"] - }, - { - "label": "Dsa", - "data": ["Dsa"] - }, - { - "label": "Documentation", - "data": ["Documentation"] - }, - { - "label": "Emulator", - "data": ["Emulator"] - }, - { - "label": "Gnattest", - "data": ["Gnattest"] - }, - { - "label": "Prove", - "data": ["Prove"] - }, - { - "label": "Qgen", - "data": ["Qgen"] - }, - { - "label": "Stack", - "data": ["Stack"] - }, - { - "label": "Stub", - "data": ["Stub"] + "data": ["Compiler"], + "label": "Compiler" }, { "label": "project" @@ -1324,104 +940,8 @@ "label": "V5" }, { - "label": "Binder", - "data": ["Binder"] - }, - { - "label": "Builder", - "data": ["Builder"] - }, - { - "label": "Clean", - "data": ["Clean"] - }, - { - "label": "Compiler", - "data": ["Compiler"] - }, - { - "label": "Gnatls", - "data": ["Gnatls"] - }, - { - "label": "Install", - "data": ["Install"] - }, - { - "label": "Linker", - "data": ["Linker"] - }, - { - "label": "Naming", - "data": ["Naming"] - }, - { - "label": "Remote", - "data": ["Remote"] - }, - { - "label": "Pretty_Printer", - "data": ["Pretty_Printer"] - }, - { - "label": "Ide", - "data": ["Ide"] - }, - { - "label": "Ant", - "data": ["Ant"] - }, - { - "label": "Make", - "data": ["Make"] - }, - { - "label": "Analyzer", - "data": ["Analyzer"] - }, - { - "label": "Check", - "data": ["Check"] - }, - { - "label": "Codepeer", - "data": ["Codepeer"] - }, - { - "label": "Coverage", - "data": ["Coverage"] - }, - { - "label": "Dsa", - "data": ["Dsa"] - }, - { - "label": "Documentation", - "data": ["Documentation"] - }, - { - "label": "Emulator", - "data": ["Emulator"] - }, - { - "label": "Gnattest", - "data": ["Gnattest"] - }, - { - "label": "Prove", - "data": ["Prove"] - }, - { - "label": "Qgen", - "data": ["Qgen"] - }, - { - "label": "Stack", - "data": ["Stack"] - }, - { - "label": "Stub", - "data": ["Stub"] + "data": ["Compiler"], + "label": "Compiler" }, { "label": "project" @@ -1480,104 +1000,8 @@ "label": "V5" }, { - "label": "Binder", - "data": ["Binder"] - }, - { - "label": "Builder", - "data": ["Builder"] - }, - { - "label": "Clean", - "data": ["Clean"] - }, - { - "label": "Compiler", - "data": ["Compiler"] - }, - { - "label": "Gnatls", - "data": ["Gnatls"] - }, - { - "label": "Install", - "data": ["Install"] - }, - { - "label": "Linker", - "data": ["Linker"] - }, - { - "label": "Naming", - "data": ["Naming"] - }, - { - "label": "Remote", - "data": ["Remote"] - }, - { - "label": "Pretty_Printer", - "data": ["Pretty_Printer"] - }, - { - "label": "Ide", - "data": ["Ide"] - }, - { - "label": "Ant", - "data": ["Ant"] - }, - { - "label": "Make", - "data": ["Make"] - }, - { - "label": "Analyzer", - "data": ["Analyzer"] - }, - { - "label": "Check", - "data": ["Check"] - }, - { - "label": "Codepeer", - "data": ["Codepeer"] - }, - { - "label": "Coverage", - "data": ["Coverage"] - }, - { - "label": "Dsa", - "data": ["Dsa"] - }, - { - "label": "Documentation", - "data": ["Documentation"] - }, - { - "label": "Emulator", - "data": ["Emulator"] - }, - { - "label": "Gnattest", - "data": ["Gnattest"] - }, - { - "label": "Prove", - "data": ["Prove"] - }, - { - "label": "Qgen", - "data": ["Qgen"] - }, - { - "label": "Stack", - "data": ["Stack"] - }, - { - "label": "Stub", - "data": ["Stub"] + "data": ["Compiler"], + "label": "Compiler" }, { "label": "project" @@ -1769,14 +1193,6 @@ "result": { "isIncomplete": false, "items": [ - { - "label": "Install", - "data": ["Install"] - }, - { - "label": "Ide", - "data": ["Ide"] - }, { "label": "Imported" } @@ -1812,14 +1228,6 @@ "result": { "isIncomplete": false, "items": [ - { - "label": "Pretty_Printer", - "data": ["Pretty_Printer"] - }, - { - "label": "Prove", - "data": ["Prove"] - }, { "label": "project" }, @@ -1858,10 +1266,6 @@ "result": { "isIncomplete": false, "items": [ - { - "label": "Emulator", - "data": ["Emulator"] - }, { "label": "Extended" } @@ -1897,14 +1301,6 @@ "result": { "isIncomplete": false, "items": [ - { - "label": "Install", - "data": ["Install"] - }, - { - "label": "Ide", - "data": ["Ide"] - }, { "label": "Imported" } @@ -1940,14 +1336,6 @@ "result": { "isIncomplete": false, "items": [ - { - "label": "Pretty_Printer", - "data": ["Pretty_Printer"] - }, - { - "label": "Prove", - "data": ["Prove"] - }, { "label": "project" }, @@ -2024,10 +1412,6 @@ "items": [ { "label": "Extended_Variable" - }, - { - "label": "Emulator", - "data": ["Emulator"] } ] } From 29278aa9889fc4330d782cc0baa7e6ca0cdaf0e1 Mon Sep 17 00:00:00 2001 From: Anthony Leonardo Gracio Date: Mon, 29 Jul 2024 14:07:33 +0000 Subject: [PATCH 3/4] GPR: add "'" to completion triggerCharacters To support having completion for constructions such as: for Switches ("ada") use Compiler'Default_Switches ("ada") & ("-g"); For eng/ide/ada_language_server#1399 --- source/gpr/lsp-gpr_handlers.adb | 2 +- testsuite/gpr_lsp/completion_attribute_resolve/test.json | 2 +- testsuite/gpr_lsp/completion_package_resolve/test.json | 2 +- testsuite/gpr_lsp/completion_references/test.json | 2 +- testsuite/gpr_lsp/declaration/test.json | 2 +- testsuite/gpr_lsp/definition/test.json | 2 +- testsuite/gpr_lsp/gpr2_assertions/test.json | 2 +- testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.json | 2 +- testsuite/gpr_lsp/import_using_space_string/test.json | 2 +- testsuite/gpr_lsp/imported_project_errors_handling/test.json | 2 +- testsuite/gpr_lsp/invalid_file_name_support/test.json | 2 +- testsuite/gpr_lsp/no_symbol_with_empty_name/test.json | 2 +- testsuite/gpr_lsp/project_config.alire/test.json | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/source/gpr/lsp-gpr_handlers.adb b/source/gpr/lsp-gpr_handlers.adb index cfb0a6885..7888802b6 100644 --- a/source/gpr/lsp-gpr_handlers.adb +++ b/source/gpr/lsp-gpr_handlers.adb @@ -381,7 +381,7 @@ package body LSP.GPR_Handlers is Capabilities.declarationProvider := LSP.Constants.True; Capabilities.completionProvider := (Is_Set => True, - Value => (triggerCharacters => [" ", "."], + Value => (triggerCharacters => [" ", ".", "'"], resolveProvider => LSP.Constants.True, others => <>)); diff --git a/testsuite/gpr_lsp/completion_attribute_resolve/test.json b/testsuite/gpr_lsp/completion_attribute_resolve/test.json index a2254162f..2da5b2687 100644 --- a/testsuite/gpr_lsp/completion_attribute_resolve/test.json +++ b/testsuite/gpr_lsp/completion_attribute_resolve/test.json @@ -96,7 +96,7 @@ "change": 1 }, "completionProvider": { - "triggerCharacters": [" ", "."], + "triggerCharacters": [" ", ".", "'"], "resolveProvider": true }, "hoverProvider": true, diff --git a/testsuite/gpr_lsp/completion_package_resolve/test.json b/testsuite/gpr_lsp/completion_package_resolve/test.json index 997666499..bf32aa0a7 100644 --- a/testsuite/gpr_lsp/completion_package_resolve/test.json +++ b/testsuite/gpr_lsp/completion_package_resolve/test.json @@ -96,7 +96,7 @@ "change": 1 }, "completionProvider": { - "triggerCharacters": [" ", "."], + "triggerCharacters": [" ", ".", "'"], "resolveProvider": true }, "hoverProvider": true, diff --git a/testsuite/gpr_lsp/completion_references/test.json b/testsuite/gpr_lsp/completion_references/test.json index d0fda70df..db720e41b 100644 --- a/testsuite/gpr_lsp/completion_references/test.json +++ b/testsuite/gpr_lsp/completion_references/test.json @@ -96,7 +96,7 @@ "change": 1 }, "completionProvider": { - "triggerCharacters": [" ", "."], + "triggerCharacters": [" ", ".", "'"], "resolveProvider": true }, "hoverProvider": true, diff --git a/testsuite/gpr_lsp/declaration/test.json b/testsuite/gpr_lsp/declaration/test.json index c9553d1b2..97cde47bf 100644 --- a/testsuite/gpr_lsp/declaration/test.json +++ b/testsuite/gpr_lsp/declaration/test.json @@ -34,7 +34,7 @@ "change": 1 }, "completionProvider": { - "triggerCharacters": [" ", "."], + "triggerCharacters": [" ", ".", "'"], "resolveProvider": true }, "hoverProvider": true, diff --git a/testsuite/gpr_lsp/definition/test.json b/testsuite/gpr_lsp/definition/test.json index 176765b91..9fcb564a3 100644 --- a/testsuite/gpr_lsp/definition/test.json +++ b/testsuite/gpr_lsp/definition/test.json @@ -34,7 +34,7 @@ "change": 1 }, "completionProvider": { - "triggerCharacters": [" ", "."], + "triggerCharacters": [" ", ".", "'"], "resolveProvider": true }, "hoverProvider": true, diff --git a/testsuite/gpr_lsp/gpr2_assertions/test.json b/testsuite/gpr_lsp/gpr2_assertions/test.json index f1ef44104..a10289f06 100644 --- a/testsuite/gpr_lsp/gpr2_assertions/test.json +++ b/testsuite/gpr_lsp/gpr2_assertions/test.json @@ -34,7 +34,7 @@ "change": 1 }, "completionProvider": { - "triggerCharacters": [" ", "."], + "triggerCharacters": [" ", ".", "'"], "resolveProvider": true }, "hoverProvider": true, diff --git a/testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.json b/testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.json index 20d107f2d..0dbd070ba 100644 --- a/testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.json +++ b/testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.json @@ -34,7 +34,7 @@ "change": 1 }, "completionProvider": { - "triggerCharacters": [" ", "."], + "triggerCharacters": [" ", ".", "'"], "resolveProvider": true }, "hoverProvider": true, diff --git a/testsuite/gpr_lsp/import_using_space_string/test.json b/testsuite/gpr_lsp/import_using_space_string/test.json index c28f346c7..b592f3c0b 100644 --- a/testsuite/gpr_lsp/import_using_space_string/test.json +++ b/testsuite/gpr_lsp/import_using_space_string/test.json @@ -53,7 +53,7 @@ "change": 1 }, "completionProvider": { - "triggerCharacters": [" ", "."], + "triggerCharacters": [" ", ".", "'"], "resolveProvider": true }, "hoverProvider": true, diff --git a/testsuite/gpr_lsp/imported_project_errors_handling/test.json b/testsuite/gpr_lsp/imported_project_errors_handling/test.json index f00757149..290089a10 100644 --- a/testsuite/gpr_lsp/imported_project_errors_handling/test.json +++ b/testsuite/gpr_lsp/imported_project_errors_handling/test.json @@ -34,7 +34,7 @@ "change": 1 }, "completionProvider": { - "triggerCharacters": [" ", "."], + "triggerCharacters": [" ", ".", "'"], "resolveProvider": true }, "hoverProvider": true, diff --git a/testsuite/gpr_lsp/invalid_file_name_support/test.json b/testsuite/gpr_lsp/invalid_file_name_support/test.json index 0f5972d62..a672230f0 100644 --- a/testsuite/gpr_lsp/invalid_file_name_support/test.json +++ b/testsuite/gpr_lsp/invalid_file_name_support/test.json @@ -53,7 +53,7 @@ "change": 1 }, "completionProvider": { - "triggerCharacters": [" ", "."], + "triggerCharacters": [" ", ".", "'"], "resolveProvider": true }, "hoverProvider": true, diff --git a/testsuite/gpr_lsp/no_symbol_with_empty_name/test.json b/testsuite/gpr_lsp/no_symbol_with_empty_name/test.json index 8c20aaadc..344fc5352 100644 --- a/testsuite/gpr_lsp/no_symbol_with_empty_name/test.json +++ b/testsuite/gpr_lsp/no_symbol_with_empty_name/test.json @@ -39,7 +39,7 @@ "change": 1 }, "completionProvider": { - "triggerCharacters": [" ", "."], + "triggerCharacters": [" ", ".", "'"], "resolveProvider": true }, "hoverProvider": true, diff --git a/testsuite/gpr_lsp/project_config.alire/test.json b/testsuite/gpr_lsp/project_config.alire/test.json index c4469913d..b8f462f9b 100644 --- a/testsuite/gpr_lsp/project_config.alire/test.json +++ b/testsuite/gpr_lsp/project_config.alire/test.json @@ -37,7 +37,7 @@ "change": 1 }, "completionProvider": { - "triggerCharacters": [" ", "."], + "triggerCharacters": [" ", ".", "'"], "resolveProvider": true }, "hoverProvider": true, From 8412678f9938c7091b8b644b1f2124441267690b Mon Sep 17 00:00:00 2001 From: Maxim Reznik Date: Wed, 24 Jul 2024 16:07:24 +0300 Subject: [PATCH 4/4] Update tests after changes in GPR2 Refs gpr-issues#256 --- testsuite/gpr_lsp/gpr2_assertions/prj.gpr | 1 - testsuite/gpr_lsp/gpr2_assertions/test.json | 181 ------------------ testsuite/gpr_lsp/gpr2_assertions/test.yaml | 4 - .../gpr2_unexpected_exceptions/prj.gpr | 12 -- .../gpr2_unexpected_exceptions/test.json | 129 ------------- .../gpr2_unexpected_exceptions/test.yaml | 4 - .../test.json | 6 +- .../test.yaml | 3 - .../no_symbol_with_empty_name/test.json | 6 +- .../no_symbol_with_empty_name/test.yaml | 3 - 10 files changed, 6 insertions(+), 343 deletions(-) delete mode 100644 testsuite/gpr_lsp/gpr2_assertions/prj.gpr delete mode 100644 testsuite/gpr_lsp/gpr2_assertions/test.json delete mode 100644 testsuite/gpr_lsp/gpr2_assertions/test.yaml delete mode 100644 testsuite/gpr_lsp/gpr2_unexpected_exceptions/prj.gpr delete mode 100644 testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.json delete mode 100644 testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.yaml diff --git a/testsuite/gpr_lsp/gpr2_assertions/prj.gpr b/testsuite/gpr_lsp/gpr2_assertions/prj.gpr deleted file mode 100644 index c2ce61ace..000000000 --- a/testsuite/gpr_lsp/gpr2_assertions/prj.gpr +++ /dev/null @@ -1 +0,0 @@ -project prj is for Warning_Message use ""; end prj; \ No newline at end of file diff --git a/testsuite/gpr_lsp/gpr2_assertions/test.json b/testsuite/gpr_lsp/gpr2_assertions/test.json deleted file mode 100644 index a10289f06..000000000 --- a/testsuite/gpr_lsp/gpr2_assertions/test.json +++ /dev/null @@ -1,181 +0,0 @@ -[ - { - "comment": ["test gpr2 assertions handling"] - }, - { - "start": { - "cmd": ["${ALS}", "--language-gpr"] - } - }, - { - "send": { - "request": { - "params": { - "processId": 30612, - "capabilities": { - "workspace": { - "applyEdit": false - } - }, - "rootUri": "$URI{.}" - }, - "jsonrpc": "2.0", - "id": 1, - "method": "initialize" - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 1, - "result": { - "capabilities": { - "textDocumentSync": { - "openClose": true, - "change": 1 - }, - "completionProvider": { - "triggerCharacters": [" ", ".", "'"], - "resolveProvider": true - }, - "hoverProvider": true, - "definitionProvider": true, - "documentSymbolProvider": {} - } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "initialized" - }, - "wait": [] - } - }, - { - "send": { - "request": { - "params": { - "textDocument": { - "text": "project prj is for Warning_Message use \"\"; end prj;", - "version": 0, - "uri": "$URI{prj.gpr}", - "languageId": "Gpr" - } - }, - "jsonrpc": "2.0", - "method": "textDocument/didOpen" - }, - "wait": [ - { - "method": "textDocument/publishDiagnostics", - "params": { - "uri": "$URI{prj.gpr}", - "diagnostics": [ - { - "range": { - "start": { - "line": 0, - "character": 0 - }, - "end": { - "line": 0, - "character": 0 - } - }, - "severity": 1, - "message": "GPR parser unexpected ADA.ASSERTIONS.ASSERTION_ERROR DYNAMIC_PREDICATE failed at gpr2-message.adb:23" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "textDocument/didChange", - "params": { - "textDocument": { - "uri": "$URI{prj.gpr}", - "version": 1 - }, - "contentChanges": [ - { - "range": { - "start": { - "line": 0, - "character": 40 - }, - "end": { - "line": 0, - "character": 40 - } - }, - "text": "gpr2's parser warning" - } - ] - } - }, - "wait": [ - { - "method": "textDocument/publishDiagnostics", - "params": { - "uri": "$URI{prj.gpr}", - "diagnostics": [ - { - "range": { - "start": { - "line": 0, - "character": 19 - }, - "end": { - "line": 0, - "character": 19 - } - }, - "severity": 2, - "message": "gpr2's parser warning" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "shutdown", - "method": "shutdown", - "params": null - }, - "wait": [ - { - "id": "shutdown", - "result": null - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "exit" - }, - "wait": [] - } - }, - { - "stop": { - "exit_code": 0 - } - } -] diff --git a/testsuite/gpr_lsp/gpr2_assertions/test.yaml b/testsuite/gpr_lsp/gpr2_assertions/test.yaml deleted file mode 100644 index 27b8bedc5..000000000 --- a/testsuite/gpr_lsp/gpr2_assertions/test.yaml +++ /dev/null @@ -1,4 +0,0 @@ -title: 'gpr2 parsing assertions error handling' -# Skip till gpr-issues#256 & gpr-issues#259 fixed -skip: - - ['XFAIL', 'True'] diff --git a/testsuite/gpr_lsp/gpr2_unexpected_exceptions/prj.gpr b/testsuite/gpr_lsp/gpr2_unexpected_exceptions/prj.gpr deleted file mode 100644 index 2b1cb0505..000000000 --- a/testsuite/gpr_lsp/gpr2_unexpected_exceptions/prj.gpr +++ /dev/null @@ -1,12 +0,0 @@ -with ""; -project Prj is - for Source_List_File use ""; - for Excluded_Source_List_File use ""; - for Warning_Message use ""; - package Naming is - for Body ("Ada") use "" ; - for Implementation ("Ada") use ""; - for Spec ("Ada") use ""; - for Specification ("Ada") use ""; - end Naming; -end Prj; diff --git a/testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.json b/testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.json deleted file mode 100644 index 0dbd070ba..000000000 --- a/testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.json +++ /dev/null @@ -1,129 +0,0 @@ -[ - { - "comment": ["test gpr unexpected exception handling"] - }, - { - "start": { - "cmd": ["${ALS}", "--language-gpr"] - } - }, - { - "send": { - "request": { - "params": { - "processId": 30612, - "capabilities": { - "workspace": { - "applyEdit": false - } - }, - "rootUri": "$URI{.}" - }, - "jsonrpc": "2.0", - "id": 1, - "method": "initialize" - }, - "wait": [ - { - "jsonrpc": "2.0", - "id": 1, - "result": { - "capabilities": { - "textDocumentSync": { - "openClose": true, - "change": 1 - }, - "completionProvider": { - "triggerCharacters": [" ", ".", "'"], - "resolveProvider": true - }, - "hoverProvider": true, - "definitionProvider": true, - "documentSymbolProvider": {} - } - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "initialized" - }, - "wait": [] - } - }, - { - "send": { - "request": { - "params": { - "textDocument": { - "text": "with \"\";\nproject Prj is\n for Source_List_File use \"\";\n for Excluded_Source_List_File use \"\";\n for Warning_Message use \"\";\n package Naming is\n for Body (\"Ada\") use \"\" ;\n for Implementation (\"Ada\") use \"\";\n for Spec (\"Ada\") use \"\";\n for Specification (\"Ada\") use \"\";\n end Naming;\nend Prj;", - "version": 0, - "uri": "$URI{prj.gpr}", - "languageId": "Gpr" - } - }, - "jsonrpc": "2.0", - "method": "textDocument/didOpen" - }, - "wait": [ - { - "jsonrpc": "2.0", - "method": "textDocument/publishDiagnostics", - "params": { - "uri": "$URI{prj.gpr}", - "diagnostics": [ - { - "range": { - "start": { - "line": 0, - "character": 0 - }, - "end": { - "line": 0, - "character": 0 - } - }, - "severity": 1, - "message": "GPR parser unexpected ADA.ASSERTIONS.ASSERTION_ERROR DYNAMIC_PREDICATE failed at gpr2-project-parser.adb:83" - } - ] - } - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "id": "shutdown", - "method": "shutdown", - "params": null - }, - "wait": [ - { - "id": "shutdown", - "result": null - } - ] - } - }, - { - "send": { - "request": { - "jsonrpc": "2.0", - "method": "exit" - }, - "wait": [] - } - }, - { - "stop": { - "exit_code": 0 - } - } -] diff --git a/testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.yaml b/testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.yaml deleted file mode 100644 index 27b8bedc5..000000000 --- a/testsuite/gpr_lsp/gpr2_unexpected_exceptions/test.yaml +++ /dev/null @@ -1,4 +0,0 @@ -title: 'gpr2 parsing assertions error handling' -# Skip till gpr-issues#256 & gpr-issues#259 fixed -skip: - - ['XFAIL', 'True'] diff --git a/testsuite/gpr_lsp/imported_project_errors_handling/test.json b/testsuite/gpr_lsp/imported_project_errors_handling/test.json index 290089a10..7ccdd6cdf 100644 --- a/testsuite/gpr_lsp/imported_project_errors_handling/test.json +++ b/testsuite/gpr_lsp/imported_project_errors_handling/test.json @@ -79,15 +79,15 @@ "range": { "start": { "line": 0, - "character": 0 + "character": 17 }, "end": { "line": 0, - "character": 0 + "character": 17 } }, "severity": 1, - "message": "GPR parser unexpected ADA.ASSERTIONS.ASSERTION_ERROR DYNAMIC_PREDICATE failed at gpr2-project-parser.adb:83" + "message": "missing project file for with clause" } ] } diff --git a/testsuite/gpr_lsp/imported_project_errors_handling/test.yaml b/testsuite/gpr_lsp/imported_project_errors_handling/test.yaml index 27b8bedc5..562a94ed2 100644 --- a/testsuite/gpr_lsp/imported_project_errors_handling/test.yaml +++ b/testsuite/gpr_lsp/imported_project_errors_handling/test.yaml @@ -1,4 +1 @@ title: 'gpr2 parsing assertions error handling' -# Skip till gpr-issues#256 & gpr-issues#259 fixed -skip: - - ['XFAIL', 'True'] diff --git a/testsuite/gpr_lsp/no_symbol_with_empty_name/test.json b/testsuite/gpr_lsp/no_symbol_with_empty_name/test.json index 344fc5352..1eaed140d 100644 --- a/testsuite/gpr_lsp/no_symbol_with_empty_name/test.json +++ b/testsuite/gpr_lsp/no_symbol_with_empty_name/test.json @@ -84,15 +84,15 @@ "range": { "start": { "line": 0, - "character": 0 + "character": 4 }, "end": { "line": 0, - "character": 0 + "character": 4 } }, "severity": 1, - "message": "GPR parser unexpected ADA.ASSERTIONS.ASSERTION_ERROR DYNAMIC_PREDICATE failed at gpr2-project-parser.adb:83" + "message": "missing project file for with clause" } ] } diff --git a/testsuite/gpr_lsp/no_symbol_with_empty_name/test.yaml b/testsuite/gpr_lsp/no_symbol_with_empty_name/test.yaml index 4ab0408e1..a9fcd9a7f 100644 --- a/testsuite/gpr_lsp/no_symbol_with_empty_name/test.yaml +++ b/testsuite/gpr_lsp/no_symbol_with_empty_name/test.yaml @@ -1,4 +1 @@ title: 'with empty string statement support' -# Skip till gpr-issues#256 & gpr-issues#259 fixed -skip: - - ['XFAIL', 'True']