Previous: The Navigate Menu, Up: Source Navigation


6.3 Contextual Menus for Source Navigation

This contextual menu is available from any source editor. If you right click over an entity, or first select text, the contextual menu will apply to this selection or entity.

Goto declaration of entity
Go to the declaration/spec of entity. The current entity is determined by the word located around the cursor or by the current selection if any. This capability requires support for cross-references.
Goto body of entity
Go to the body/implementation of entity. This capability requires support for cross-references.
Goto file spec/body
Open the corresponding spec file if the current edited file is a body file, or body file otherwise. This option is only available for the Ada language.
Entity calls
Display a list of all subprograms called by entity in a tree view. This is generally more convenient than using the corresponding Browsers/ submenu if you expect lots of references, See The Callgraph View.
Entity is called by
Display a list of all subprograms calling entity in a tree view. This is generally more convenient than using the correponding Browsers/ submenu if you expect lots of references, See The Callgraph View.
References
This item gives access to different capabilities related to listing or displaying references to the current entity or selection.
Find all references to entity
Find all references to entity in all the files in the project, See Find All References.
Find all references ...
This menu is similar to the one above, except it is possible to select more precisely what kind of reference should be selected. It is also possible to indicate the scope of the search, and whether the context (or caller) at each reference should be displayed. Computing the caller information will take slightly longer though.

This dialog has an option Include overriding and overriden operations, which, when activated, will include references to overriden or overriding entities of the one you selected.

This is particularly useful when you are wondering whether you can easily modify the profile of a primitive operation, since you can then see what other entities will also be impacted. If you select only the declaration check box, you will see the list of all related primitive operations.

This dialog also allows you to find out which entities are imported from a given file/unit. Click on any entity from that file (for instance on the with line for Ada code), then select the All entities imported from same file toggle button. This will display in the location window the list of all entities imported from the same file as the entity selected.

In addition, if you have selected the Show context option, you will get a list of all the exact references to these entities within the file. Otherwise, you just get a pointer to the declaration of the imported entities.

Find all local references to entity
Find all references to entity in the current file (or in the current top level unit for Ada sources). See Find All References for more details.

Browsers
This item gives access to graph representations of callers and callees for subprograms.
Entity calls
Open or raise the call graph browser on the specified entity and display all the subprograms called by entity. See Call Graph.
Entity is called by
Open or raise the call graph browser on the specified entity and display all the subprograms calling entity. See Call Graph.

Note that this capability requires a global look up in the project cross-references, which may take a significant amount of time the first time. After a global look up, information is cached in memory, so that further global queries will be faster.