Next: , Previous: Extending Projects, Up: Project Handling


7.5 The Project View

The project view, as mentioned in the general description of the GPS window, is one of the views found by default on the left of the window. It shows in a tree structure the project hierarchy, along with all the source files belonging to the project, and the entities declared in the source files.

It is worth noting that the project view provides a tree representation of the project hierarchy. If a project is imported by multiple other projects in the hierarchy, then this project will appear multiple times in the project view.

Likewise, if you have edited the project manually and have used the limited with construct to have cycles in the project dependencies, the cycle will expand infinitely. For instance, if project a imports project b, which in turns imports project a through a limited with clause, then expanding the node for a will show b. In turn, expanding the node for b will show a node for a, and so on.

The contextual menu in this project view provides a number of items to modify the project hierarchy (what each project imports), as well as to visualize and modify the attributes for each projects (compilation switches, naming scheme, ...)

The following entries are available in the contextual menu:

Show Projects Imported by...
This item will open a new window in GPS, the project browser, which displays graphically the relationships between each project in the hierarchy.
Save The Project...
This item can be selected to save a single project in the hierarchy after it was modified. Modified but unsaved projects in the hierarchy have a special icon (a pen mark is drawn on top of the standard icon). If you would rather save all the modified projects in a single step, use the menu bar item Project->Save All.
Project/Properties
This item will open a new dialog, and give access to all the attributes of the project: tool switches, naming schemes, source directories, ... See The Project Properties Editor.
Project/Edit source file
This menu will load the project file into an editor, so that you can manually edit it. This should be used if you need to access some features of the project files that are not accessible graphically (renames statements, variables, ...)
Project/Dependencies...
This opens the dependencies editor (see The Project Dependencies Editor).
Add Configuration Variable
This menu item should be used to add new configuration variables, as described in Scenarios and Configuration Variables.
Build
This menu offers the submenu "Clean" which remove all object files and other compilation artifacts associated to the current project.

Any time one or several projects are modified, the contents of the project view is automatically refreshed. No project is automatically saved. This provides a simple way to temporarily test new values for the project attributes. Unsaved modified projects are shown with a special icon in the project view, displaying a pen mark on top of the standard icon:

project-modified.jpg

Note that in all tree views in GPS, you can use the <+> and <-> keys to expand and collapse nodes (e.g. projects and directories).