[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
2.1 The Welcome Dialog 2.2 The Menu Bar 2.3 The Tool Bar 2.4 The Work Space 2.5 The Project Explorer 2.6 The Messages Window
2.7 The Shell Window
2.8 The Locations Tree 2.9 The Execution Window 2.10 The Status Line 2.11 The Task Manager
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
When starting GPS, a welcome dialog is displayed by default, giving the following choices:
OK
button, GPS will create a
default internal project with the following properties:
The project supports Ada files only, using the default GNAT
naming scheme: .ads
for spec files, .adb
for body files.
A single source directory corresponding to the current directory.
The current directory can be set by modifying the text entry on clicking
on the Browse
button. All the Ada files found in this directory
will be considered as part of the default project.
The object directory where the object and executable files will be put, corresponding also to the current directory.
OK
button will start a
wizard allowing you to specify most of the properties for a new project. Once
the project is created, GPS will save it and load it automatically.
See 7.6 The Project Wizard for more details on the project wizard.
Browse
button,
or by using a previously loaded project listed in the combo box. When a
project is selected, clicking on the OK
button will load this
project and open the main window.
-P
switch on the command line, and load the corresponding project if
present.
Then, it will look for a project file in the current directory and will
load the first project file found.
If no project file can be found in the current directory, GPS will start with the default project.
To reset this property, go to the menu Edit->Preferences
.
See section 15.1 The Preferences Dialog.
When you specify a -P switch on the command line, or if there is only one project file in the current directory, GPS will start immediately with the project file specified, instead of displaying the welcome dialog.
In addition, if you specify source files on the command line, GPS will also start immediately, using the default project if no project is specified.
By default, files specified on the command line are taken as is and can
be absolute or relative pathnames. In addition, if you prepend a filename
with the =
character, then GPS will look for the file in the source
search path of the project.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This is a standard menu bar that gives access to all the global functionalities of GPS. It is usually easier to access a given functionality using the various contextual menus provided throughout GPS: these menus give direct access to the most relevant actions given the current context (e.g. a project, a directory, a file, an entity, ...). Contextual menus pop up when the right mouse button is clicked.
The menu bar gives access to the following items:
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The tool bar provides shortcuts via buttons to some typical actions: creating a new file, opening a file, saving the current file; undo/redo last editing; cut to clipboard, copy to clipboard, paste from clipboard; go to previous/next location; start/continue the debugging session, step/next execution, finish current procedure.
The icon on the far right of the tool bar will be animated to indicate that an action (e.g. a build or a search) is going on in the background.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The whole work space is based on a multiple document interface, See section 4. Multiple Document Interface.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The project explorer is composed of multiple views which can be accessed
by default by clicking on the corresponding pages, or if they are not shown
by using the Project
menu items.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The explorer views are initially displayed on the left side of the GPS window. Their goal is to show a full view of the various components of your projects. These various components are presented below.
Under Windows, it is possible to drop files (coming e.g. from the Explorer) in any of these views with the following behavior: a project file dropped will be loaded; any other file will open a source editor on this file.
The following screen-shot displays the two pages side-by-side: on the
left, the Project View
, and on the right the File View
.
Each view provides an interactive search capability allowing you to quickly search in the information currently displayed. The default key to start an interactive search is Ctrl-i. See Interactive Search for more details.
The various components that are displayed in these explorers are the following:
They can be organized into a project hierarchy, where a root project can import other projects, with their own set of sources.
Initially, a default project is created, that includes all the sources in the current directory.
The Project View
page of the explorer displays this project
hierarchy: the top node in this view 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.
A given project might appear multiple times in the
Project View
, if it is imported by several other projects.
There exists a second display for this project view, which lists all projects with no hierarchy: all projects appear only once in the explorer, at the top level. This display might be useful for deep project hierarchies, to make it easier to find projects in the explorer.
This display is activated through the contextual menu entry
Show flat view
, which acts as a switch between the two displays.
A special icon with an exclamation 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.
Project View
, or directly mimicking their
physical organization on the disk (including Windows drives) in the
File View
.
In the Project View
, 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 Show absolute
paths
contextual menu.
Special nodes are created for object and executables directories. No files are shown for these.
Project View
, 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 section 7.2 Supported Languages.
The File View
will display all the files that actually exist
on the disk. Filters can be set through the contextual menu to only
show the files and directories that belong to the project
hierarchy. See the menu Show files from project only
.
A given file might appear multiple times in the Project View
,
if the project it belongs to is imported by several other projects.
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.
If you open the search dialog through the Navigate->Find...
menu, you have the possibility to search for anything in the explorer,
either a file or an entity. Note that searching for an entity might be
a little slow if you have lots of files.
A contextual menu, named Locate in Explorer
, is also provided when
inside a source editor. This will automatically search for the first entry for
this file in the explorer. This contextual menu is also available in other
modules, e.g. when selecting a file in the Dependency Browser
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
As described in the GNAT User'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.
GPS provides a simple access to these variables, through a special
area on top of the Project View
. These variables are called
Configuration Variables
, since they provide various scenarios for
the same set of project files.
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
New variables can be added through the contextual menu Add
Configuration Variable
in the Project View
. The list of
possible values for a variable can be changed by clicking on the
button on the left of the variable's name.
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.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Messages window is used by GPS to display information and feedback about operations, such as build output, information about processes launched, error messages.
This is a read-only window, which means that only output is available, no input is possible.
For an input/output window, see 2.9 The Execution Window and also 2.7 The Shell Window.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These windows give access to the various scripting languages supported by GPS, and allow you to type commands such as editing a file or compiling without using the menu items or the mouse.
See 15.8 Scripting GPS for more information on using scripting languages within GPS.
You can use the up and down keys to navigate through the history of commands.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Location Tree is filled whenever GPS needs to display a list of locations in the source files (typically, when performing a global search, compilation results, and so on).
The Location Tree shows a hierarchy of categories, which contain files, which contain locations. Clicking on a location item will bring up a file editor at the requested place. Right-clicking on file or category items brings up a contextual menu allowing you to remove the corresponding node from the view.
Every time a new category is created, as a result of a compilation or a
search operation for instance, the first entry of that category is
automatically selected, and the corresponding editor opened. This behavior
can be controlled through a preference Jump To First Location
.
To navigate through the next and previous location (also called Tag
),
you can use the menu items Navigate->Previous Tag
and
Navigate->Next Tag
, or the corresponding key bindings.
In some cases, a wrench icon will be associated on the left of a compilation message. See 13.3 Code Fixing for more information on how to make advantage of this icon.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Each time a program is launched using the menu Build->Run
, a new
execution window is created to provide input and output for this program.
In order to allow post mortem analysis and copy/pasting, the execution windows are not destroyed when the application terminates.
To close an execution window, click on the cross icon on the top right corner
of the window, or use the menu File->Close
, or the menu
Window->Close
or the key binding Ctrl-W.
If you close the execution window while the application is still running, a dialog window is displayed, asking whether you want to kill the application, or to cancel the close operation.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The status line is composed of two areas: on the left a status bar and on the right one or several progress bars.
The status bar is used to display temporary information about GPS
operations. Note that most of the information GPS displays can be found
in the Messages
window.
The progress bars are used to display information about on going operations such as builds, searches, or VCS commands. These tasks operate in the background, and can be paused/resumed via a contextual menu. This contextual menu is available by right-clicking on the progress bars themselves or on the corresponding lines in the Task Manager. See 2.11 The Task Manager
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Task Manager window lists all the currently running GPS operations that run in the background, such as builds, searches or VCS commands.
For each of these tasks, the Task Manager shows the status of the task, and the current progress. The execution of theses tasks can be suspended using a contextual menu, brought up by right-clicking on a line.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |