This file is indexed.

/usr/share/gps/plug-ins/gnatmetric.xml is in gnat-gps-common 5.0-6.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?xml version="1.0" ?>
<!--  Adds support for GNAT's gnatmetric tool

      The gnatmetric tool computes software metrics on Ada code. This is
      a command line provided with the GNAT compiler.
      This package integrates it into GPS:
         - menu /Tools/Compute metrics for root project
         - menu /Tools/Compute metrics for current file
      The result of gnatmetric is displayed in a graphical tree for easy
      browsing.
-->

<GPS>
  <action name="metrics project" category="Metrics" >
     <filter_and>
       <filter id="Project only" />
       <filter language="ada" />
     </filter_and>
     <description>Run GNAT Metrics on a project</description>
     <shell show-command="false">Editor.save</shell>
     <shell output="none">Project.root</shell>
     <shell output="none">Project.get_attribute_as_string %1 "gnat" "ide"</shell>
     <shell>echo %1 metric -x "%pps"</shell>
     <external
      server="tools_server"
      progress-regexp="completed (\d+) out of (\d+).*"
      progress-current="1"
      progress-final="2"
      progress-hide="true">%2 metric -dd -x "%pps"</external>
     <shell>Locations.parse "%1" metrics</shell>
     <shell show-command="false" output="none">XMLViewer.create_metric "Metrics (%p)"</shell>
     <shell show-command="false">XMLViewer.parse %1 metrix.xml</shell>
  </action>

  <action name="metrics root project"  category="Metrics">
     <description>Run GNAT Metrics on a root project</description>
     <shell show-command="false">Editor.save</shell>
     <shell output="none">Project.root</shell>
     <shell output="none">Project.get_attribute_as_string %1 "gnat" "ide"</shell>
     <shell>echo %1 metric -x "%PPs"</shell>
     <external
      server="tools_server"
      progress-regexp="completed (\d+) out of (\d+).*"
      progress-current="1"
      progress-final="2"
      progress-hide="true">%2 metric -dd -x "%PPs"</external>
     <shell>Locations.parse "%1" metrics</shell>
     <shell show-command="false" output="none">XMLViewer.create_metric "Metrics (%P)"</shell>
     <shell show-command="false">XMLViewer.parse %1 metrix.xml</shell>
  </action>

  <action name="metrics file" category="Metrics" >
     <filter_and>
       <filter id="File" />
       <filter language="ada" />
     </filter_and>
     <description>Run GNAT Metrics on a single file</description>
     <shell show-command="false">Editor.save</shell>
     <shell output="none">Project.root</shell>
     <shell output="none">Project.get_attribute_as_string %1 "gnat" "ide"</shell>
     <shell>echo %1 metric -x "%pps" "%F"</shell>
     <external server="tools_server">%2 metric -x "%pps" "%F"</external>
     <shell>Locations.parse "%1" metrics</shell>
     <shell show-command="false" output="none">XMLViewer.create_metric "Metrics (%f)"</shell>
     <shell show-command="false">XMLViewer.parse %1 metrix.xml</shell>
  </action>

  <contextual action="metrics project" >
     <title>Compute metrics for %p</title>
  </contextual>
  <contextual action="metrics file" >
     <title>Compute metrics for %f</title>
  </contextual>

  <submenu>
    <title>Tools</title>
    <submenu after="Macro">
      <title>_Metrics</title>
      <menu action="metrics root project">
        <title>Compute metrics for root _project</title>
      </menu>
      <menu action="metrics file">
        <title>Compute metrics for current _file</title>
      </menu>
    </submenu>
  </submenu>

</GPS>