The GNAT Project Explorer provides a GNAT-specific view of the project, including a contextual menu, without the additional information provided by the Navigator (for example) that might be extraneous in normal use. Projects that are not configured as GNATbench projects are given the standard resource layout with no changes. With the GNAT Project Explorer you will not need to use the Eclipse Navigator except for a few Eclipse resource-oriented activities.
In this view, GNATbench projects contain four kind of entries: the source directories, the run-time library, the object directory, and finally the resources present in the project but not managed through the GNAT project file.
The source directories are listed at the beginning of the project. Their content is the exact sources of the project, filtering out non-source files.
The run-time library entry gives access to the run-time files currently used by the project.
The object directory contains the object code files and the ali files generated by the compilation process. Unless you specify otherwise, this directory will also contain the executable image, but as shown below the executable can be in a dedicated directory as well.
A sample project in the GNAT Project Explorer is shown in the figure below.
In the Ada perspective you can open the view by using the Window menu entry and selecting the shortcut to the view:
Otherwise you can use the Window menu entry and select "Show View" -> "Other..." to bring up the dialog box shown below. Expand the "Ada" category and select "GNAT Project Explorer".
Press OK and the Explorer will open.
The GNAT Project Explorer shows the source directories and source files within those directories, in tree format, as the first node(s) in the project. The icon for the source folders is that of a folder containing a package, as shown below. Clicking on file names within these trees will open the corresponding files in the Ada-aware editor.
Note that the source directories are displayed as a flat list of directories, regardless of how they are represented on the disk.
Additionally, the GNAT Project Explorer includes browser functionality similar to that of the Outline View. In particular, if you expand a given file node you will see icons for the language-specific contents of the file. Clicking on one of these entities in the Project Explorer will take you to the source code for that entity, opening the file in an editor if not already open.
Project nodes within the GNAT Project Explorer have a contextual menu offering specific commands for Ada development, as well as some general capabilities.
Lower level nodes also have a contextual menu offering specific commands for Ada development. Note in particular the command to compile the corresponding file.
The run-time library entry gives access to the run-time files currently used by the project. You can open any of these files in the editor for browsing. You should not alter these files unless you intend to recompile the library.
Note that the run-time library files include the GNAT-provided utility packages in the GNAT.* hierarchy.
Note also that the displayed content may change if you install a new version of the compiler or if you change the settings of the project file to use a different compiler or run-time library.
In the following figure we have expanded the run-time library node to show the source files and have opened the spec for package Ada.Calendar.Formatting in the file named "a-calfor.ads"