Skip to content

Commit 4ccd51b

Browse files
committed
Clarify the message in hovers when in aggregate projects
When an aggregate project is loaded, in the interest of performance, we don't query all contexts when resolving a tooltip, but only resolve for the first project in which the file belong. In this case, we annotate the tooltip text with a mention of the project. This change clarifies this mention so that it cannot be interpreted as a failure to resolve requests in the rest of the toplevel projects. A test existed to exercise this: update the baseline to match the text that we now expect. For W505-020
1 parent 88d8abf commit 4ccd51b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

source/ada/lsp-ada_handlers.adb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3251,8 +3251,10 @@ package body LSP.Ada_Handlers is
32513251
Location_Text := LSP.Lal_Utils.Node_Location_Image (Decl);
32523252

32533253
if Self.Project_Tree.Root_Project.Is_Aggregate_Project then
3254-
Location_Text.Append (" in project ");
3254+
Location_Text.Append (VSS.Characters.Latin.Line_Feed);
3255+
Location_Text.Append ("As defined in project ");
32553256
Location_Text.Append (C.Id);
3257+
Location_Text.Append (" (other projects skipped).");
32563258
end if;
32573259

32583260
Response.result.Value.contents.Vector.Append

testsuite/ada_lsp/implementation.aggregates/test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@
239239
"value": "function Common_Fun return Integer",
240240
"language": "ada"
241241
},
242-
"at common_pack.ads (4:4) in project p"
242+
"at common_pack.ads (4:4)\nAs defined in project p (other projects skipped)."
243243
]
244244
}
245245
}
@@ -271,7 +271,7 @@
271271
"value": "function Common_Fun return Integer",
272272
"language": "ada"
273273
},
274-
"at common_pack.ads (4:4) in project p"
274+
"at common_pack.ads (4:4)\nAs defined in project p (other projects skipped)."
275275
]
276276
}
277277
}

0 commit comments

Comments
 (0)