Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement of mouse-over message for inherited subprogram call #161

Open
zertovitch opened this issue Jun 4, 2023 · 1 comment
Open
Assignees

Comments

@zertovitch
Copy link

zertovitch commented Jun 4, 2023

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.

inherited_2

@AnthonyLeonardoGracio
Copy link
Collaborator

Hello,

I agree it would be great to have this info, We'll see if that can be done easily, without any performance impact while checking for this info.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants