You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ section below it for the last release. -->
11
11
* The project name is now displayed in the Ada & SPARK extension status bar
12
12
* VS Code now displays a custom file icon for Ada files
13
13
* Add support for loading Cobertura XML coverage reports in addition to GNATcoverage XML reports, via the unified command `ada: GNATcoverage - Load an existing coverage report`
14
+
* New [Project View](./doc/vscode-ug.md#project-view) panel in the Explorer sidebar showing the GPR project structure as a tree, grouping source files by project and source directory
Copy file name to clipboardExpand all lines: doc/vscode-ug.md
+51Lines changed: 51 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -209,6 +209,57 @@ A status bar item displaying the project-loading status and various useful comma
209
209
210
210

211
211
212
+
## Project View
213
+
214
+
The Ada & SPARK extension contributes a **Project View** panel in the VS Code Explorer sidebar. It shows the structure of the loaded GPR project as a tree, grouping source files by their project and source directory.
215
+
216
+

217
+
218
+
### Tree Structure
219
+
220
+
The tree reflects the GPR project hierarchy:
221
+
222
+
***Root project** — the top-level `.gpr` project file.
223
+
***Sub-projects** — projects imported, aggregated, or extended by the root project, shown as children.
224
+
***Source directories** — each project's source directories are shown as folder nodes. Directories declared in the project file are always shown, even when empty.
225
+
***Source files** — source files are listed under their containing directory. Clicking a file opens it in the editor.
226
+
***Object directory** — optionally displayed under each project (see [View Options](#view-options) below).
227
+
***Runtime project** — optionally shown at the bottom of the tree, listing the GNAT runtime source files (see [View Options](#view-options) below).
228
+
229
+
### Navigation
230
+
231
+
***Reveal Active File** (`Ada: Reveal in Project View`) — locates and selects the currently open editor file in the Project View tree. This command is also available as an editor context menu.
232
+
***Reveal in Explorer** — available via right-click on a source file or a project file node; opens the VS Code Explorer and selects the item there.
233
+
234
+
### File Management
235
+
236
+
Source files can be **moved between source directories** by dragging them from one directory node and dropping them onto another. A confirmation dialog is shown before any move is performed, and name collisions are detected and reported.
237
+
238
+
### Filtering
239
+
240
+
The Project View toolbar provides a filter button (funnel icon). When active, only projects, directories, and files whose names contain the filter string are shown. Clear the filter by clicking the filled funnel icon that replaces it.
241
+
242
+
### View Options
243
+
244
+
Click the **View Options** button (`···`) in the Project View toolbar to toggle the following display settings:
245
+
246
+
| Option | Setting | Description |
247
+
|--------|---------|-------------|
248
+
| Flat Mode |`ada.projectView.flatMode`| Show all projects as a flat list rather than a hierarchy |
249
+
| Show Object directories |`ada.projectView.showObjectDirectories`| Show each project's object directory |
250
+
| Show Runtime files |`ada.projectView.showRuntimeFiles`| Show GNAT runtime source files |
251
+
252
+
These options can also be set permanently via the corresponding [VS Code settings](./settings.md).
253
+
254
+
### Context Menu Commands
255
+
256
+
Right-clicking a node in the Project View exposes additional commands:
257
+
258
+
***Show File Dependencies Graph** — opens an interactive graph of Ada file dependencies for the selected file. Only available for source files.
259
+
***Show GPR Dependencies Graph** — opens an interactive graph of GPR project dependencies. Only available for GPR project files.
260
+
261
+
Project file items also have a context menu with commands to build, analyze, and clean the project, among others.
262
+
212
263
## Alire Support
213
264
214
265
When the workspace is an Alire crate (i.e. it contains an `alire.toml` file), the extension uses Alire to determine the GPR project that should be loaded and to obtain an environment where the crate's dependencies have been provisioned.
0 commit comments