0

Is there a way to color the calling Ada procedures or functions in Gnat GPS IDE? Is there any custom solution to this? Check the comment in the following code to see what I mean:

package body Pkg is

   function Get_Amount (a : b) return Integer is
   begin
      return 0;
   end Get_Amount;

   procedure Print_Owing is
   begin
      Get_Amount (x); --This call here shall be colored if possible but its not.
   end Print_Owing;

end Pkg;
BugShotGG
  • 5,008
  • 8
  • 47
  • 63

2 Answers2

0

Right-click the name, try "Name is called by" menu item.

Shark8
  • 4,095
  • 1
  • 17
  • 31
  • Well thats not what I mean... It should be marked/colored as, for example, the data types. – BugShotGG Aug 07 '18 at 18:00
  • Are you asking if you can get GNAT GPS to colour the identifiers in procedure calls with a unique colour? (I haven't tried, but you could check out the Ada editor settings in GNAT GPS. There might be something useful.) – Jacob Sparre Andersen Aug 09 '18 at 18:41
0

The coloration of procedures and functions is not supported. Even for types, you'll notice that they are only colored when they appear in a declaration or a signature:

declare:
    a : Some_type; -- colored
    b : Some_Type; -- colored
begin
    a := Some_Type'("42"); -- not colored
    b := Sometype(a);      -- not colored
end

In order to be able to identify that something is a function or a procedure, you would have keep track of the whole project semantics in order to color any file.

Faibbus
  • 1,115
  • 10
  • 18
  • Well thats the point of the question. How to bypass or modify something so that it can work the same way as for example intellij etc – BugShotGG Oct 03 '18 at 16:14