Skip to content

Commit b6b7533

Browse files
Matheo RomeAnthonyLeonardoGracio
authored andcommitted
Add images and gifs to the ShowGraph documentation
1 parent 38a744b commit b6b7533

File tree

9 files changed

+161
-97
lines changed

9 files changed

+161
-97
lines changed

doc/ShowGraphDoc.md

Lines changed: 128 additions & 97 deletions
Large diffs are not rendered by default.

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ Ada & SPARK VS Code Extension User's Guide
1616
Refactoring Tools <refactoring_tools.md>
1717
Tips and Tricks <tips_and_tricks.rst>
1818
Ada Language Server Settings <settings.md>
19+
Code Visualizer <code_visualizer.md>
1920
ALS Traces <traces.md>
2021
Language Server Protocol Extensions <extensions.md>

doc/media/context.png

62.3 KB
Loading

doc/media/expansion.gif

6.06 MB
Loading

doc/media/folding.gif

1.84 MB
Loading

doc/media/openGraph.png

635 KB
Loading

doc/media/references.gif

1.53 MB
Loading

doc/media/searchGraph.png

215 KB
Loading

doc/vscode-ug.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,38 @@ Moreover when working with an Alire crate, VS Code tasks automatically use stand
216216

217217
All other tasks use `alr exec -- ...` to execute the command in the environment provided by Alire.
218218

219+
## Code Visualizer
220+
221+
The Ada & SPARK VS Code extension can display your code structure as interactive graphs. These graphs help you understand relationships in your codebase by using Language Server Protocol (LSP) requests.
222+
223+
### Available Graph Types
224+
225+
The extension provides four types of interactive graphs:
226+
227+
**For all languages with Language Server support:**
228+
229+
* `Calls: Show Call Hierarchy Graph` - Shows how functions call each other in your project
230+
* `Types: Show Type Hierarchy Graph` - Shows relationships between different data types
231+
232+
**Specific to Ada and GPR files:**
233+
234+
* `Ada: Show File Dependencies Graph` - Shows how Ada source files depend on each other
235+
* `Ada: Show GPR Dependencies Graph` - Shows relationships between GPR project files
236+
237+
### How to Use
238+
239+
To create a graph:
240+
241+
1. Right-click on a function, type, or anywhere in an Ada/GPR file
242+
2. Select the appropriate "Show ... Graph" command from the context menu
243+
3. An interactive graph opens in a new tab where you can:
244+
- Move nodes around by dragging
245+
- Zoom in and out
246+
- Expand or collapse parts of the graph
247+
- Navigate directly to your code
248+
249+
For detailed instructions and advanced features, see the [complete documentation](ShowGraphDoc.md).
250+
219251
## GNATtest Support
220252

221253
If you install GNATtest, the Ada & SPARK extension for VS Code will provide the following functionalities:

0 commit comments

Comments
 (0)