Skip to content

Commit d76b239

Browse files
Merge branch 'topic/eng/ide/ada_language_server#1473' into 'master'
Change priorities for sources/mains commands See merge request eng/ide/ada_language_server!1754
2 parents 8cda5ec + 3bcd097 commit d76b239

File tree

8 files changed

+122
-5
lines changed

8 files changed

+122
-5
lines changed

source/ada/lsp-ada_handlers-mains_commands.ads

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private
4141

4242
overriding function Priority (Self : Command)
4343
return LSP.Server_Jobs.Job_Priority
44-
is (LSP.Server_Jobs.Low);
44+
is (LSP.Server_Jobs.Immediate);
4545

4646
for Command'External_Tag use "als-mains";
4747

source/ada/lsp-ada_handlers-source_dirs_commands.ads

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private
4242

4343
overriding function Priority (Self : Command)
4444
return LSP.Server_Jobs.Job_Priority
45-
is (LSP.Server_Jobs.Low);
45+
is (LSP.Server_Jobs.Immediate);
4646

4747
for Command'External_Tag use "als-source-dirs";
4848

testsuite/ada_lsp/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,11 @@ JSON file preprocessing
164164
-----------------------
165165

166166
Before execution Tester does some text substitution in each string literal.
167-
* Each substring `${NAME}` is replaced by an environment variable with
167+
* Each substring `${NAME}` is replaced by an environment variable with
168168
given NAME. The `DIR` environment variable points to test's directory.
169169

170-
* Each substring `$URI{x}` is replaced by corresponding URI `file:///test_dir/x`.
171-
where `x` should be path relative to the directory where `.json` file is located.
170+
* Each substring `$URI{x}` is replaced by corresponding URI `file:///test_dir/x`.
171+
where `x` should be a path relative to the directory where the `.json` file is located.
172172

173+
* Each substring `$FILE{x}` is replaced by corresponding file path `/test_dir/x`.
174+
where `x` should be a path relative to the directory where the `.json` file is located.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
project Default is
2+
for Main use ("main_1.adb", "main_2.adb");
3+
end Default;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
procedure Main_1 is
2+
begin
3+
null;
4+
end Main_1;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
procedure Main_2 is
2+
begin
3+
null;
4+
end Main_2;
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
[
2+
{
3+
"comment": "Check als-mains command"
4+
},
5+
{
6+
"start": {
7+
"cmd": ["${ALS}"]
8+
}
9+
},
10+
{
11+
"send": {
12+
"request": {
13+
"jsonrpc": "2.0",
14+
"id": 0,
15+
"method": "initialize",
16+
"params": {
17+
"processId": 1,
18+
"rootUri": "$URI{.}",
19+
"capabilities": {}
20+
}
21+
},
22+
"wait": [
23+
{
24+
"id": 0,
25+
"result": {
26+
"capabilities": {
27+
"textDocumentSync": 2,
28+
"executeCommandProvider": {
29+
"commands": ["<HAS>", "als-mains"]
30+
}
31+
}
32+
}
33+
}
34+
]
35+
}
36+
},
37+
{
38+
"send": {
39+
"request": {
40+
"jsonrpc": "2.0",
41+
"method": "workspace/didChangeConfiguration",
42+
"params": {
43+
"settings": {
44+
"ada": {
45+
"projectFile": "$URI{default.gpr}"
46+
}
47+
}
48+
}
49+
},
50+
"wait": [
51+
{
52+
"jsonrpc": "2.0",
53+
"id": 1,
54+
"method": "window/workDoneProgress/create",
55+
"params": {
56+
"token": "<ANY>"
57+
}
58+
}
59+
]
60+
}
61+
},
62+
{
63+
"send": {
64+
"request": {
65+
"jsonrpc": "2.0",
66+
"id": "sw1",
67+
"method": "workspace/executeCommand",
68+
"params": {
69+
"command": "als-mains"
70+
}
71+
},
72+
"wait": [
73+
{
74+
"jsonrpc": "2.0",
75+
"id": "sw1",
76+
"result": ["$FILE{main_1.adb}", "$FILE{main_2.adb}"]
77+
}
78+
]
79+
}
80+
},
81+
{
82+
"send": {
83+
"request": {
84+
"jsonrpc": "2.0",
85+
"id": "shutdown",
86+
"method": "shutdown",
87+
"params": null
88+
},
89+
"wait": [{ "id": "shutdown", "result": null }]
90+
}
91+
},
92+
{
93+
"send": {
94+
"request": { "jsonrpc": "2.0", "method": "exit" },
95+
"wait": []
96+
}
97+
},
98+
{
99+
"stop": {
100+
"exit_code": 0
101+
}
102+
}
103+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
title: 'commands.mains'

0 commit comments

Comments
 (0)