Improvement of mouse-over message for inherited subprogram call
@AnthonyLeonardoGracio is already working on this.
Since Jun 27, 2023.
- Dominant language
- Ada
- Stars
- 531
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
When the mouse pointer is on a subprogram name, at a location where the subprogram is called, the mouse-over message could indicate that the subprogram is inherited, if it is inherited.
The improved message could be useful especially regarding non-tagged types where a user might non be aware that an inheritance happened. An example:
package X is
type T is new Integer;
procedure do_it (p : in T);
end X;
with Ada.Text_IO;
package body X is
procedure do_it (p : in T) is
begin
Ada.Text_IO.Put_Line ("X.do_it" & p'Image);
end;
end X;
with X;
package Y is
type T is new X.T;
end Y;
with Y;
procedure Test_XY is
begin
Y.do_it (1);
end;
Project file:
project XY is
for Source_Dirs use (".");
for Object_Dir use "obj";
for Main use ("test_xy.adb");
end XY;
On putting the mouse pointer on the "do_it" part of "Y.do_it (1);" the message says "procedure do_it (p : in T); at x.ads (3:4)".
Since do_it is declared in package X and only implicitly in Y, adding to the message something like ", inherited" or ", inherited (RM 3.4 23/2)" could be very helpful, especially in the case of simple types like type T is new Integer.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.