|
| 1 | +[ |
| 2 | + { |
| 3 | + "comment":[ |
| 4 | + "Do FindAllReferenfes, then change subproject, run command `als-reload-project` and do it again." |
| 5 | + ] |
| 6 | + }, { |
| 7 | + "start": { |
| 8 | + "cmd": ["${ALS}"] |
| 9 | + } |
| 10 | + }, { |
| 11 | + "send": { |
| 12 | + "request": {"jsonrpc":"2.0","id":0,"method":"initialize","params":{ |
| 13 | + "processId":1, |
| 14 | + "rootUri":"$URI{.}", |
| 15 | + "capabilities":{}} |
| 16 | + }, |
| 17 | + "wait":[{ |
| 18 | + "id": 0, |
| 19 | + "result":{ |
| 20 | + "capabilities":{ |
| 21 | + "textDocumentSync": 2, |
| 22 | + "executeCommandProvider": { |
| 23 | + "commands": [ |
| 24 | + "<HAS>", |
| 25 | + "als-reload-project" |
| 26 | + ] |
| 27 | + }, |
| 28 | + "referencesProvider":true |
| 29 | + } |
| 30 | + } |
| 31 | + }] |
| 32 | + } |
| 33 | + }, { |
| 34 | + "send": { |
| 35 | + "request": { |
| 36 | + "jsonrpc":"2.0", |
| 37 | + "method":"workspace/didChangeConfiguration", |
| 38 | + "params":{ |
| 39 | + "settings":{ |
| 40 | + "ada": { |
| 41 | + "projectFile": "choices.gpr" |
| 42 | + } |
| 43 | + } |
| 44 | + } |
| 45 | + }, |
| 46 | + "wait":[] |
| 47 | + } |
| 48 | + }, { |
| 49 | + "send": { |
| 50 | + "request": { |
| 51 | + "jsonrpc":"2.0", |
| 52 | + "method":"textDocument/didOpen", |
| 53 | + "params":{ |
| 54 | + "textDocument": { |
| 55 | + "uri": "$URI{to_be_called.adb}", |
| 56 | + "languageId": "ada", |
| 57 | + "version": 1, |
| 58 | + "text": "procedure To_Be_Called is\nbegin\n null;\nend To_Be_Called;\n" |
| 59 | + } |
| 60 | + } |
| 61 | + }, |
| 62 | + "wait":[] |
| 63 | + } |
| 64 | + }, { |
| 65 | + "send": { |
| 66 | + "request": { |
| 67 | + "jsonrpc":"2.0", |
| 68 | + "id":"references-1", |
| 69 | + "method":"textDocument/references", |
| 70 | + "params":{ |
| 71 | + "textDocument": { |
| 72 | + "uri": "$URI{to_be_called.adb}" |
| 73 | + }, |
| 74 | + "position": { |
| 75 | + "line": 0, |
| 76 | + "character": 15 |
| 77 | + }, |
| 78 | + "context": { |
| 79 | + "includeDeclaration":false |
| 80 | + } |
| 81 | + } |
| 82 | + }, |
| 83 | + "sortReply": { "result": "uri" }, |
| 84 | + "wait":[{ |
| 85 | + "id": "references-1", |
| 86 | + "result":[{ |
| 87 | + "uri": "$URI{choices/second.adb}", |
| 88 | + "range": { |
| 89 | + "start": { |
| 90 | + "line": 0, |
| 91 | + "character": 5 |
| 92 | + }, |
| 93 | + "end": { |
| 94 | + "line": 0, |
| 95 | + "character": 17 |
| 96 | + } |
| 97 | + }, |
| 98 | + "alsKind": ["reference"] |
| 99 | + }, { |
| 100 | + "uri": "$URI{choices/second.adb}", |
| 101 | + "range": { |
| 102 | + "start": { |
| 103 | + "line": 3, |
| 104 | + "character": 3 |
| 105 | + }, |
| 106 | + "end": { |
| 107 | + "line": 3, |
| 108 | + "character": 15 |
| 109 | + } |
| 110 | + }, |
| 111 | + "alsKind": ["call"] |
| 112 | + }] |
| 113 | + }] |
| 114 | + } |
| 115 | + }, { |
| 116 | + "shell": ["${PYTHON}", "${DIR}/change_project.py" ] |
| 117 | + }, { |
| 118 | + "send": { |
| 119 | + "request": { |
| 120 | + "jsonrpc":"2.0", |
| 121 | + "id":"sw1", |
| 122 | + "method":"workspace/executeCommand", |
| 123 | + "params":{ |
| 124 | + "command": "als-reload-project", |
| 125 | + "arguments": [ |
| 126 | + ] |
| 127 | + } |
| 128 | + }, |
| 129 | + "wait":[ |
| 130 | + { |
| 131 | + "jsonrpc": "2.0", |
| 132 | + "id": "sw1", |
| 133 | + "result": null |
| 134 | + } |
| 135 | + ] |
| 136 | + } |
| 137 | + }, { |
| 138 | + "send": { |
| 139 | + "request": { |
| 140 | + "jsonrpc":"2.0", |
| 141 | + "id":"references-2", |
| 142 | + "method":"textDocument/references", |
| 143 | + "params":{ |
| 144 | + "textDocument": { |
| 145 | + "uri": "$URI{to_be_called.adb}" |
| 146 | + }, |
| 147 | + "position": { |
| 148 | + "line": 0, |
| 149 | + "character": 15 |
| 150 | + }, |
| 151 | + "context": { |
| 152 | + "includeDeclaration":false |
| 153 | + } |
| 154 | + } |
| 155 | + }, |
| 156 | + "sortReply": { "result": "uri" }, |
| 157 | + "wait":[{ |
| 158 | + "id": "references-2", |
| 159 | + "result":[{ |
| 160 | + "uri": "$URI{choices/second.adb}", |
| 161 | + "range": { |
| 162 | + "start": { |
| 163 | + "line": 0, |
| 164 | + "character": 5 |
| 165 | + }, |
| 166 | + "end": { |
| 167 | + "line": 0, |
| 168 | + "character": 17 |
| 169 | + } |
| 170 | + }, |
| 171 | + "alsKind": ["reference"] |
| 172 | + }, { |
| 173 | + "uri": "$URI{choices/second.adb}", |
| 174 | + "range": { |
| 175 | + "start": { |
| 176 | + "line": 3, |
| 177 | + "character": 3 |
| 178 | + }, |
| 179 | + "end": { |
| 180 | + "line": 3, |
| 181 | + "character": 15 |
| 182 | + } |
| 183 | + }, |
| 184 | + "alsKind": ["call"] |
| 185 | + }, { |
| 186 | + "uri": "$URI{subproject/third.adb}", |
| 187 | + "range": { |
| 188 | + "start": { |
| 189 | + "line": 0, |
| 190 | + "character": 5 |
| 191 | + }, |
| 192 | + "end": { |
| 193 | + "line": 0, |
| 194 | + "character": 17 |
| 195 | + } |
| 196 | + }, |
| 197 | + "alsKind": ["reference"] |
| 198 | + }, { |
| 199 | + "uri": "$URI{subproject/third.adb}", |
| 200 | + "range": { |
| 201 | + "start": { |
| 202 | + "line": 3, |
| 203 | + "character": 3 |
| 204 | + }, |
| 205 | + "end": { |
| 206 | + "line": 3, |
| 207 | + "character": 15 |
| 208 | + } |
| 209 | + }, |
| 210 | + "alsKind": ["call"] |
| 211 | + }] |
| 212 | + }] |
| 213 | + } |
| 214 | + }, { |
| 215 | + "send": { |
| 216 | + "request": { |
| 217 | + "jsonrpc":"2.0", |
| 218 | + "id": "shutdown", |
| 219 | + "method":"shutdown", |
| 220 | + "params":null |
| 221 | + }, |
| 222 | + "wait":[{ "id": "shutdown", "result": null }] |
| 223 | + } |
| 224 | + }, { |
| 225 | + "send": { |
| 226 | + "request": {"jsonrpc":"2.0", "method":"exit", "params":{}}, |
| 227 | + "wait":[] |
| 228 | + } |
| 229 | + }, { |
| 230 | + "stop": { |
| 231 | + "exit_code": 0 |
| 232 | + } |
| 233 | + } |
| 234 | +] |
0 commit comments