Next: , Up: Source Browsing


10.1 General Issues

GPS contains several kinds of browsers, that have a common set of basic functionalities. There are currently four such browsers: the project browser (see The Project Browser), the call graph (see Call Graph), the dependency browser (see Dependency Browser) and the entity browser (see 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:

Scrolling
When a lot of items are displayed in the canvas, the currently visible area might be too small to display all of them. In this case, scrollbars will be added on the sides, so that you can make other items visible. Scrolling can also be done with the arrow keys.
Layout
A basic layout algorithm is used to organize the items. This algorithm is layer oriented: items with no parents are put in the first layer, then their direct children are put in the second layer, and so on. Depending on the type of browser, these layers are organized either vertically or horizontally. This algorithm tries to preserve as much as possible the positions of the items that were moved interactively.

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.

Interactive moving of items
Items can be moved interactively with the mouse. Click and drag the item by clicking on its title bar. The links will still be displayed during the move, so that you can check whether it overlaps any other item. If you are trying to move the item outside of the visible part of the browser, the latter will be scrolled.
Links
Items can be linked together, and will remain connected when items are moved. Different types of links exist, see the description of the various browsers.

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.

Exporting
The entire contents of a browser can be exported as a PNG image using the entry Export to PNG... in the background contextual menu. It can also be exported in SVG format using the Export to SVG... entry.
Zooming
Several different zoom levels are available. The contextual menu in the background of the browser contains three entries: 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.

Selecting items
Items can be selected by clicking inside them. Multiple items can be selected by holding the <control> key while clicking in the item. Alternatively, you can click and drag the mouse inside the background of the browser. All the items found in the selection rectangle when the mouse is released will be selected.

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.

Hyper-links
Some of the items will contain hyper links, displayed in blue by default, and underlined. Clicking on these will generally display new items.

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
Browsers can become confusing if there are many items and many links. You can lighten them by selecting this menu entry. As a result, the item will remain in the canvas, but none of the links to or from it will be visible. Selecting the item will still highlight linked items, so that this information remains available.
Remove unselected items
Selecting this menu will remove all the items that are not currently selected. This is a convenient method to clean up the contents of the browser.
Remove selected items
Selecting this menu will remove all the items that are currently selected.