File: locations.rst

package info (click to toggle)
gnat-gps 5.3dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 50,360 kB
  • ctags: 11,617
  • sloc: ada: 374,346; ansic: 92,327; python: 15,979; xml: 12,186; sh: 3,277; makefile: 1,113; awk: 154; perl: 128; java: 17
file content (30 lines) | stat: -rw-r--r-- 1,280 bytes parent folder | download
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
**************
Locations View
**************

From `View`, click on the blue link: `stack.ads:32`, this will open the file
:file:`stack.ads` at line 32.  Then from the source editor (file
:file:`stack.ads`), select the contextual menu `References->Find all references
to View`: this highlights the `Locations` tree which now contains all the
references for `View`, grouped by files (:file:`stack.ads` and
:file:`stack.adb`).

The first location is highlighted automatically: this is the spec of the
procedure `View`. Now click in the tree on the `+` sign (or triangle) at the
left of :file:`stack.adb`: two locations are listed, at line 90 and 97.  Click
on each of these locations: they correspond to the procedure body.

The `Find all references` capability is another way to list all the uses of an
entity, and it confirms that `View` isn't called in our project.

Remove *View* body by e.g selecting it, and pressing the :kbd:`Delete` key,
then save the file (:kbd:`Ctrl-S`).

Do the same for the spec, save the file.

Close the :file:`stack.ads` and :file:`stack.adb` files (menu File->Close, or
using the shortcut :kbd:`Ctrl-W`).  Rebuild by pressing the :kbd:`F4` key.

Let's now see how to create a project corresponding to the *sdc*
project we've used in this tutorial.