[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
10.1 General Issues 10.2 Call Graph 10.3 Dependency Browser 10.4 Entity Browser
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GPS contains several kinds of browsers, that have a common set of basic functionalities. There are currently four such browsers: the project browser (see section 7.9 The Project Browser), the call graph (see section 10.2 Call Graph), the dependency browser (see section 10.3 Dependency Browser) and the entity browser (see section 10.4 Entity Browser).
All these browsers are interactive viewers. They contain a number of items, whose visual representation depends on the type of information displayed in the browser (they can be projects, files, entities, ...).
In addition, the following capabilities are provided in all browsers:
The refresh layout
menu item in the background contextual menu
can be used to recompute the layout of items at any time, even for
items that were previously moved interactively.
By default, links are displayed as straight lines. You can choose to
use orthogonal links instead, which are displayed only with vertical
or horizontal lines. Select the entry orthogonal links
in the
background contextual menu.
png
image
using the entry Export...
in the background contextual menu.
zoom in
,
zoom out
and zoom
. The latter is used to select directly
the zoom level you want.
This zooming capability is generally useful when lots of items are displayed in the browser, to get a more general view of the layout and the relationships between the items.
Selected items are drawn with a different title bar color. All items linked to them also use a different title bar color, as well as the links. This is the most convenient way to understand the relationships between items when lots of them are present in the browser.
Two types of contextual menus are available in the browsers: the background contextual menu is available by right-clicking in the background area (i.e. outside of any item). As described above, it contains entries for the zooming, selecting of orthogonal links, and refresh; the second kind of contextual menu is available by right-clicking in items.
The latter menu contains various entries. Most of the entries are added by various modules in GPS (VCS module, source editor, ...). In addition, each kind of browser also has some specific entries, which is described in the corresponding browser's section.
There are two common items in all item contextual menus:
Hide Links
Remove all other items
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The call graph shows graphically the relationship between subprogram callers and callees. A link between two items indicate that one of them is calling the other.
A special handling is provided for renaming entities (in Ada): if a subprogram is a renaming of another one, both items will be displayed in the browser, with a special hashed link between the two. Since the renaming subprogram doesn't have a proper body, you will then need to ask for the subprograms called by the renamed to get the list.
In this browser, clicking on the right arrow in the title bar will display all the entities that are called by the selected item.
Clicking on the left arrow will display all the entities that call the selected item (i.e. its callers).
This browser is accessible through the contextual menu in the project explorer and source editor, by selecting one of the items:
References->Entity calls
References->Entity is called by
The contextual menu available by right-clicking on the entities in the browser has the following new entries, in addition to the ones added by other modules of GPS.
Entity calls
Entity is called by
Go To Spec
Go To Body
Locate in explorer
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The dependency browser shows the dependencies between source files. Each item in the browser represents one source file.
In this browser, clicking on the right arrow in the title bar will
display the list of files that the selected file depends on. A file
depend on another one if it explicitly imports it (with
statement in Ada, or #include
in C/C++). Implicit dependencies
are currently not displayed in this browser, since the information is
accessible by opening the other direct dependencies.
Clicking on the left arrow in the title bar will display the list of files that depend on the selected file.
This browser is accessible through the contextual menu in the explorer, by selecting one of the following items:
Show dependencies for file
This has the same effect as clicking on the right arrow for a file already in the browser, and will display the direct dependencies for that file.
Show files depending on file
This has the same effect as clicking on the left arrow for a file already in the browser, and will display the list of files that directly depend on that file.
The background contextual menu in the browser adds a few entries to the standard menu:
Open file...
This menu entry will display an external dialog in which you can select the name of a file to analyze.
Refresh
This menu entry will check that all links displays in the dependency browser are still valid. If not, they are removed. The arrows in the title bar are also reset if necessary, in case new dependencies were added for the files.
The browser is not refreshed automatically, since there are lots of cases where the dependencies might change (editing source files, changing the project hierarchy or the value of the scenario variables,...)
Show system files
This menu entry indicates whether standard system files (runtime files
for instance in the case of Ada) are displayed in the browser. By
default, these files will only be displayed if you explicitly select
them through the Open file
menu, or the contextual menu in the
project explorer.
Show implicit dependencies
This menu entry indicates whether implicit dependencies should also be
displayed for the files. Implicit dependencies are files that are
required to compile the selected file, but that are not explicitly
imported through a with
or #include
statement. For
instance, the body of generics in Ada is an implicit dependency.
Any time one of the implicit dependencies is modified, the selected
file should be recompiled as well.
The contextual menu available by right clicking on an item also adds a number of entries:
Analyze other file
This will open a new item in the browser, displaying the complement file for the selected one. In Ada, this would be the body if you clicked on a spec file, or the opposite. In C, it depends on the naming conventions you specified in the project properties, but you would generally go from a `.h' file to a `.c' file and back.
Show dependencies for file
These play the same role as in the project explorer contextual menu
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The entity browser displays static information about any source entity.
The exact content of the items depend on the type of the item. For instance:
Ada record / C struct
Ada tagged type / C++ class
Subprograms
Packages
and more ...
This browser is accessible through the contextual menu in the explorer, when clicking on an entity:
Examine entity entity
Open a new item in the entity browser that displays information for the selected entity.
Most information in the items are click-able (by default, they appear as underlined blue text). Clicking on one of these hyper links will open a new item in the entity browser for the selected entity.
This browser can display the parent entities for an item. For instance, for a C++ class or Ada tagged type, this would be the types it derives from. This is accessible by clicking on the up arrow in the title bar of the item.
Likewise, children entities (for instance types that derive from the item) can be displayed by clicking on the down arrow in the title bar.
An extra button appear in the title bar for the C++ class or Ada tagged types, which toggles whether the inherited methods (or primitive operations in Ada) should be displayed. By default, only the new methods, or the ones that override an inherited one, are displayed. The parent's methods are not shown, unless you click on this title bar button.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |