This file is indexed.

/usr/share/doc/gnat-gps/html/The-Project-View.html is in gnat-gps-doc 5.0-16.

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
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 2002-2010 AdaCore.

This document is free; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This document is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, see http://www.gnu.org/licenses/.

A copy of the license is included in the section entitled
"GNU General Public License". -->
<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Using the GNAT Programming Studio: The Project View</title>

<meta name="description" content="Using the GNAT Programming Studio: The Project View">
<meta name="keywords" content="Using the GNAT Programming Studio: The Project View">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Index-table.html#Index-table" rel="index" title="Index table">
<link href="Description-of-the-Main-Windows.html#Description-of-the-Main-Windows" rel="up" title="Description of the Main Windows">
<link href="The-File-View.html#The-File-View" rel="next" title="The File View">
<link href="The-Work-Space.html#The-Work-Space" rel="previous" title="The Work Space">
<style type="text/css">
<!--
   

a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
pre.smallexample {background-color:rgb(240,240,240);
                     font-family: courier new,courier,fixed;
                     font-size: 14px;
                     margin: 0px 40px 0px 40px;
                     border-width: 1px 2px 2px 1px;
                     border-top-style: dotted;
                     border-left-style: dotted;
                     border-right-style: solid;
                     border-bottom-style: solid;
                     border-color: black;}
   code             {color:black;
                     font-family: courier new,courier,fixed;
                     font-size: 14px;}
   body             {font-family: arial,helvetica,sans-serif;
                     font-size: 16px;
                     max-width: 800px;
                     text-align: justify}
   samp             {font-family: courier new,courier,fixed;
                     font-size: 14px}
                    

-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="The-Project-View"></a>
<div class="header">
<p>
Next: <a href="The-File-View.html#The-File-View" accesskey="n" rel="next">The File View</a>, Previous: <a href="The-Work-Space.html#The-Work-Space" accesskey="p" rel="previous">The Work Space</a>, Up: <a href="Description-of-the-Main-Windows.html#Description-of-the-Main-Windows" accesskey="u" rel="up">Description of the Main Windows</a> &nbsp; [<a href="Index-table.html#Index-table" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="The-Project-View-1"></a>
<h3 class="section">2.6 The Project View</h3>
<a name="index-project-view"></a>
<a name="index-project-view-1"></a>
<a name="index-project-3"></a>

<p>The project view provides a representation of the various components of your
project hierarchy, as listed below.
It is displayed by default on the left side of the main window, and can
be selected by using the <code>Project-&gt;Project View</code> or
<code>Tools-&gt;Views-&gt;Project</code> menu items.
</p>
<a name="index-drag_002dn_002ddrop"></a>
<p>Under Windows, it is possible to drop files (coming e.g. from the Explorer)
in the project view with the following behavior: a project file dropped
will be loaded; any other file will be opened in a new source editor.
</p>

<a name="index-screen-shot-2"></a>
<img src="project-view.jpg" alt="project-view">

<a name="index-interactive-search"></a>
<p>The project view, as well as the file and outline view provide an
interactive search capability allowing you to quickly
search in the information currently displayed. The default key
to start an interactive search is <tt class="key">control-f</tt>.
<a name="Interactive-Search"></a>This will open a small window
at the bottom of the view where you can interactively type names.
The first matching name in the tree will be selected while you type it.
You can then also use the <tt class="key">up</tt> and <tt class="key">down</tt> keys to navigate through
all the items matching the current text.
</p>
<p>The various components that are displayed are:
</p>
<dl compact="compact">
<dt><b>projects</b></dt>
<dd><a name="index-project-view-2"></a>
<p>All the sources you are working with are put under
control of projects. These projects are a way to store the switches to
use for the various tools, as well as a number of other properties.
</p>
<p>They can be organized into a project hierarchy, where a root project
can import other projects, with their own set of sources.
</p>
<p>Initially, a default project is created, that includes all the sources
in the current directory.
</p>
<p>The <code>Project View</code> displays this project hierarchy: the top node
is the root project of your application (generally, this is where the
source file that contains the main subprogram will be located). Then a node
is displayed for each imported project, and recursively for their own imported
projects.
</p>
<p>A given project might appear multiple times in the
<code>Project View</code>, if it is imported by several other projects.
</p>
<p>There exists a second display for this project view, which lists
all projects with no hierarchy: all projects appear only once in the view,
at the top level. This display might be useful for deep project hierarchies, to
make it easier to find projects in the project view.
</p>
<a name="index-Show-flat-view"></a>
<p>This display is activated through the contextual menu entry
<code>Show flat view</code>, which acts as a switch between the two displays.
</p>
<p>A special icon with a pen mark is displayed if the project
was modified, but not saved yet. You can choose to save it at any time
by right-clicking on it. GPS will remind you to save it before any
compilation, or save it automatically, if the corresponding preference
is saved.
</p>
</dd>
<dt><b>directories</b></dt>
<dd><a name="index-directory"></a>
<a name="index-Windows"></a>
<p>The files inside a project can be organized into several physical
directories on the disk. These directories are displayed under each
project node in the <code>Project View</code>
</p>
<a name="index-Show-absolute-paths"></a>
<p>You can chose whether you want to see the absolute path names for the
directories or paths relative to the location of the project. This is done
through the <code>Show absolute paths</code> contextual menu.
</p>
<p>Special nodes are created for object and executables directories. No
files are shown for these.
</p>
<a name="index-Show-hidden-directories"></a>
<p>The contextual menu entry <code>Show hidden directories</code> can be used to filter
the directories considered as hidden. This can be used to not display the
version control directories like <samp>CVS</samp> or <samp>.svn</samp> for example.
</p>
</dd>
<dt><b>files</b></dt>
<dd><a name="index-file"></a>
<a name="index-file-view"></a>
<p>The source files themselves are stored in the directories, and
displayed under the corresponding nodes. Note that
only the source files that actually belong to the
project (i.e. are written in a language supported by that project and
follow its naming scheme) are actually visible.
For more information on supported languages, See <a href="Supported-Languages.html#Supported-Languages">Supported Languages</a>.
</p>
<p>A given file might appear multiple times in the <code>Project View</code>,
if the project it belongs to is imported by several other projects.
</p>
<p>If you left click on a file and keep the button pressed, you can drop it
anywhere in GPS to open an editor at that location.
</p>
</dd>
<dt><b>entities</b></dt>
<dd><a name="index-entity"></a>
<p>If you open the node for a source file, the file is parsed by one of the
fast parsers integrated in GPS so that all entities declared in
the project can be shown. These entities are grouped into various
categories, which depend on the language. Typical categories include
subprograms, packages, types, variables, tasks, &hellip;
</p>
</dd>
</dl>

<p>Double-clicking on a file, or simple clicking on any entity will open
a source editor and display respectively the first line in this file
or the line on which the entity is defined.
</p>
<p>You can also drag a file anywhere into GPS. This will open a new editor
if the file is not already edited, or move the existing editor otherwise.
If you press <tt class="key">shift</tt> at the same time, and the file is already edited,
a new view of the existing editor is created instead.
</p>





<a name="index-search"></a>
<a name="index-find"></a>
<p>If you open the search dialog through the <code>Navigate-&gt;Find or Replace...</code>
menu, you have the possibility to search for anything in the project view,
either a file or an entity. Note that searching for an entity can be slow
if you have lots of files, and/or big files.
</p>
<a name="index-view"></a>
<a name="index-locate-in-project-view"></a>
<p>A contextual menu, named <code>Locate in Project View</code>, is also provided when
inside a source editor. This will automatically search for the first entry for
this file in the project view. This contextual menu is also available in other
modules, e.g. when selecting a file in the <code>Dependency Browser</code>.
</p>
<a name="The-configuration-variables"></a>
<h4 class="subsection">2.6.1 The configuration variables</h4>
<a name="index-configuration-variable"></a>
<a name="index-project-variable"></a>
<a name="index-variable"></a>

<a name="index-GNAT"></a>
<a name="index-project-file"></a>
<a name="index-project-4"></a>
<p>As described in the GNAT User&rsquo;s Guide, the project files can be
configured through external variables (typically environment
variables). This means that e.g. the exact list of source files, or the
exact switches to use to compile the application can be changed when
the value of these external variables is changed.
</p>
<p>GPS provides a simple access to these variables, through a window
called the <code>Scenario View</code>. These variables are called
<code>Configuration Variables</code>, since they provide various scenarios for
the same set of project files.
</p>

<a name="index-screen-shot-3"></a>
<img src="scenario-view.jpg" alt="scenario-view">

<p>A combo box is displayed in this area for each environment
variable the project depends on. The current value of the variable can
be set simply by selecting it from the pop-down window that appears
when you click on the arrow on the right of the variable name
</p>
<a name="index-project-view-3"></a>
<p>New variables can be added through the contextual menu
<code>Project-&gt;Add Configuration Variable</code> in the <code>Project View</code>.
The list of possible values for a variable can be changed by clicking on the
button on the left of the variable&rsquo;s name.
</p>
<p>Whenever you change the value of one of the variables, the project is
automatically recomputed, and the list of source files or directories
is changed dynamically to reflect the new status of the
project. Starting a new compilation at that point will use the new
switches, and all the aspects of GPS are immediately affected
according to the new setup.
</p>

<a name="Icons-for-source-language-entities"></a>
<h4 class="subsection">2.6.2 Icons for source language entities</h4>
<a name="index-icons-for-source-language-entities"></a>

<p>Entities in the source code are presented with representative icons
within the various GPS views (the <em>Outline</em>, <em>Project</em>,
and <em>Entity</em> views, for example).
These icons indicate both the language categories of the entities, such as
packages and methods, as well as compile-time visibility.
In addition, the icons distinguish entity
declarations from other entities.  The same icons are used for all
programming languages supported by the viewers, with language-specific
interpretations for both compile-time visibility and recognizing
declarations.
</p>
<p>There are five language categories used for all supported languages:
<em>package</em>, <em>subprogram</em>, <em>type</em>, <em>variable</em>, and
<em>generic</em>.  The icons
corresponding to these language categories are as follows.
</p>
<ul>
<li> The <em>package</em> category&rsquo;s icon is a square.

<img src="square_x.png" alt="square_x">

</li><li> The <em>subprogram</em> category&rsquo;s icon is a circle.

<img src="circle_x.png" alt="circle_x">

</li><li> The <em>type</em> category&rsquo;s icon is a triangle.

<img src="triangle_x.png" alt="triangle_x">

</li><li> The <em>variable</em> category&rsquo;s icon is a dot.

<img src="dot_x.png" alt="dot_x">

</li><li> The <em>generic</em> category&rsquo;s  icon is a diamond.

<img src="diamond_x.png" alt="diamond_x">
</li></ul>

<p>These basic icons are enhanced with decorators, when appropriate, to
indicate compile-time visibility constraints and to distinguish
declarations from completions. For example, the icons for entity
declarations have a small &ldquo;S&rdquo; decorator added, denoting a &ldquo;spec&rdquo;.
</p>
<p>With respect to compile-time visibility, icons for &ldquo;protected&rdquo;
and &ldquo;private&rdquo;
entities appear within an enclosing box indicating a visibility
constraint. For entities with &ldquo;protected&rdquo; visibility, this enclosing box
is colored in gray. &ldquo;Private&rdquo; entities are enclosed within a red box.
The icons for &ldquo;public&rdquo; entities have no such enclosing box. For example,
a variable with &ldquo;private&rdquo; visibility would be represented by an icon
consisting of a dot enclosed within a red box.
</p>
<p>These additional decorators are combined when appropriate. For example,
the icon corresponding to the &ldquo;private&rdquo; declaration of a &ldquo;package&rdquo;
entity would be a square, as for any package entity, with a small &ldquo;S&rdquo;
added, all enclosed within a red box.
</p>
<p>Language constructs are mapped to the categories in a language-specific
manner.  For example, C++ namespaces and Ada packages correspond to the
<em>package</em> category.  C functions and Ada subprograms correspond to the
<em>method</em> category, and so on.  The <em>generic</em> category is a
general category representing other language entities, but note that not
all possible language constructs are mapped to categories and icons.  (Note
also that the <em>generic</em> category does not correspond to Ada generic
units or C++ templates.)
</p>
<p>The names of the categories should not be interpreted literally in terms
of language constructs because the categories are rather general, in
order to limit the number used. The <em>variable</em> category includes both
constants and variables in Ada, for example. Limiting the number of
categories maintains a balance between presentation complexity and the
need to support distinct programming languages.
</p>
<p>Icons for a given entity may appear more than once within a view. For
example, an Ada private type will have both a partial view in the
visible part of the enclosing package as well as a full view in the
private part of the package. Two triangle icons will therefore appear
for the two occurrences of the type name, one with the additional
decorator indicating the &ldquo;private&rdquo; compile-time visibility.
</p>
<hr>
<div class="header">
<p>
Next: <a href="The-File-View.html#The-File-View" accesskey="n" rel="next">The File View</a>, Previous: <a href="The-Work-Space.html#The-Work-Space" accesskey="p" rel="previous">The Work Space</a>, Up: <a href="Description-of-the-Main-Windows.html#Description-of-the-Main-Windows" accesskey="u" rel="up">Description of the Main Windows</a> &nbsp; [<a href="Index-table.html#Index-table" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>