[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. Description of the Main Windows

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 and Python Windows  

2.8 The Locations Tree  
2.9 The Execution Window  
2.10 The Status Line  
2.11 The Task Manager  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1 The Welcome Dialog

welcome

When starting GPS, a welcome dialog is displayed by default, giving the following choices:

Start with default project in directory
If you select this option and click on the 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.

Create new project with wizard
Selecting this option and clicking on the 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.

Open existing project
You can select an existing project by clicking on the 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.

Always show this dialog when GPS starts
If unset, the welcome dialog won't be shown in future sessions. In this case, GPS will behave as follows: it will first look for a -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.

Quit
If you click on this button, GPS will terminate immediately.

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] [ ? ]

2.2 The Menu Bar

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:

File
See The File Menu.

Edit
See The Edit Menu.

Navigate
See section 6.2 The Navigate Menu.

VCS
See section 12.2 The VCS Menu.

Project
See section 7.5 The Project Menu.

Build
See section 9.1 The Build Menu.

Debug
See section 11.1 The Debug Menu.

Tools
See section 13.1 The Tools Menu.

Window
See section 4. Multiple Document Interface.

Help
See section 3.1 The Help Menu.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3 The Tool Bar

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] [ ? ]

2.4 The Work Space

The whole work space is based on a multiple document interface, See section 4. Multiple Document Interface.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.5 The Project Explorer

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] [ ? ]

2.5.1 The explorer views

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.

explorer-views

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. This will open a small window at the bottom of the explorer 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 up and down keys to navigate through all the items matching the current text.

The various components that are displayed in these explorers are the following:

projects
As mentioned before, 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.

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.

directories
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 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.

files
The source files themselves are stored in the directories, and displayed under the corresponding nodes. Note that in the 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.

entities
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,...

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.

Moving the mouse over the different components displayed on the project explorer view will open tooltips with some more information depending on the type of component:

projects
The tooltip contains the project full pathname.

directories
The tooltip contains the directory full pathname and the project name in which it is defined.

files
The tooltip contains the base filename and the project name in which it is defined.

entities
The tooltip contains the entity name and parameters for routines followed by the location in the form filename:line where it is declared.

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] [ ? ]

2.5.2 The configuration variables

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] [ ? ]

2.6 The Messages Window

The Messages window is used by GPS to display information and feedback about operations, such as build output, information about processes launched, error messages.

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 and Python Windows.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.7 The Shell and Python Windows

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.

Some of these windows, especially the python window, might not be visible in your version of GPS, if GPS wasn't compiled with the support for that specific scripting language.

See 15.7 Scripting GPS for more information on using scripting languages within GPS.

shell-window

You can use the up and down keys to navigate through the history of commands.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.8 The Locations Tree

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).

locations-view

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.

Left-clicking on a line in the Location Tree brings up a contextual menu with the following entries:

Sort by subcategory
Toggle the sorting of the entries by sub-categories. This is useful, for example, for separating the warnings from the errors in the build results.

Jump to location
Open the location contained in the message, if any.

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] [ ? ]

2.9 The Execution Window

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] [ ? ]

2.10 The Status Line

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] [ ? ]

2.11 The Task Manager

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.

When exiting GPS, if there are tasks running in the Task Manager, a window will display those tasks. You can also bring up a contextual menu on the items in this window. You can force the exit at any time by pressing the confirmation button, which will kill all remaining tasks, or continue working in GPS by pressing the Cancel button.

task-manager


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Mail Server on November, 29 2004 using texi2html