Skip to content

Commit f44b917

Browse files
author
automatic-merge
committed
Merge remote branch 'origin/master' into edge
2 parents 302f469 + 3ad8705 commit f44b917

File tree

22 files changed

+1315
-477
lines changed

22 files changed

+1315
-477
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ section below it for the last release. -->
88
* Added a `Ada: Report Issue` command that opens the [VS Code Issue Reporter](https://code.visualstudio.com/docs/supporting/FAQ#_report-an-issue-with-a-vs-code-extension) with an extension-specific template
99
* `Go to Definition` now jumps respectively on the `begin`, `private` and `body` keywords
1010
for subprograms, packages and tasks when clicking on the `is` keyword following their declarations
11+
* New refactoring: [Delete Entity](https://github.com/AdaCore/ada_language_server/blob/master/doc/refactoring_tools.md#delete-entity)
1112

1213
## 26.0.202507021
1314

README.md

Lines changed: 1 addition & 391 deletions
Large diffs are not rendered by default.

doc/Set-workspace-specific-environment-variables.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
This small tutorial will help you to create a workspace-specific environment, allowing you to set and/or modify environment variables for your project (e.g: put the needed toolchain in front of your `PATH`).
55

6-
This is particularly useful when working on [remote machines](Working-on-a-remote-machine) in order
6+
This is particularly useful when working on [remote machines](Working-on-a-remote-machine) in order
77
to avoid modifying the environment globally just to work on a given project.
88

99
## Prerequisites
@@ -23,33 +23,33 @@ Extensions view (`Ctrl+Shift+X`).
2323

2424
Basically you just need to specify your environment variables and their associated values via the `terminal.integrated.env.*` VS Code settings in your workspace file (or your `settings.json` file), like in the following example:
2525

26-
```
27-
// Set a workspace-specific environment for OSX platforms.
28-
"terminal.integrated.env.osx": {
29-
// Set MAIN_NUMBER scenario variable to MAIN_2 directly from the environment
30-
"MAIN_NUMBER": "MAIN_2",
26+
```json
27+
// Set a workspace-specific environment for OSX platforms.
28+
"terminal.integrated.env.osx": {
29+
// Set MAIN_NUMBER scenario variable to MAIN_2 directly from the environment
30+
"MAIN_NUMBER": "MAIN_2",
3131

3232
// Set custom GPR_PROJECT_PATH
33-
"GPR_PROJECT_PATH": "${workspaceFolder}/imported:${env:GPR_PROJECT_PATH}:"
33+
"GPR_PROJECT_PATH": "${workspaceFolder}/imported:${env:GPR_PROJECT_PATH}:"
3434
},
3535

36-
// Set a workspace-specific environment for Linux platforms.
37-
"terminal.integrated.env.linux": {
38-
// Set MAIN_NUMBER scenario variable to MAIN_2 directly from the environment
39-
"MAIN_NUMBER": "MAIN_2",
36+
// Set a workspace-specific environment for Linux platforms.
37+
"terminal.integrated.env.linux": {
38+
// Set MAIN_NUMBER scenario variable to MAIN_2 directly from the environment
39+
"MAIN_NUMBER": "MAIN_2",
4040

4141
// Set custom GPR_PROJECT_PATH
42-
"GPR_PROJECT_PATH": "${workspaceFolder}/imported:${env:GPR_PROJECT_PATH}:"
42+
"GPR_PROJECT_PATH": "${workspaceFolder}/imported:${env:GPR_PROJECT_PATH}:"
4343
},
4444

45-
// Set a workspace-specific environment for Windows
46-
"terminal.integrated.env.windows": {
47-
// Set MAIN_NUMBER scenario variable to MAIN_2 directly from the environment
48-
"MAIN_NUMBER": "MAIN_2",
45+
// Set a workspace-specific environment for Windows
46+
"terminal.integrated.env.windows": {
47+
// Set MAIN_NUMBER scenario variable to MAIN_2 directly from the environment
48+
"MAIN_NUMBER": "MAIN_2",
4949

5050
// Set custom GPR_PROJECT_PATH
51-
"GPR_PROJECT_PATH": "${workspaceFolder}\\imported;${env:GPR_PROJECT_PATH}:"
52-
}
51+
"GPR_PROJECT_PATH": "${workspaceFolder}\\imported;${env:GPR_PROJECT_PATH}:"
52+
}
5353
```
5454

5555
## Example
File renamed without changes.

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# -- Project information -----------------------------------------------------
77
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
88

9-
project = "Ada & SPARK extension for VS Code"
9+
project = "Ada & SPARK VS Code Extension User's Guide"
1010
project_copyright = "2024-2025, AdaCore"
1111
author = "AdaCore"
1212

doc/index.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
.. Ada & SPARK extension for VS Code documentation master file, created by
1+
.. Ada & SPARK VS Code Extension User's Guide master file, created by
22
sphinx-quickstart on Thu Dec 26 19:26:17 2024.
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
6-
Ada & SPARK extension for VS Code documentation
7-
===============================================
6+
Ada & SPARK VS Code Extension User's Guide
7+
==========================================
88

99
.. toctree::
1010
:maxdepth: 2
1111
:caption: Contents:
1212

13+
14+
User's Guide <vscode-ug.md>
1315
Tutorial: Using Ada in VS Code <Getting-Started.md>
14-
refactoring_tools
15-
settings
16-
traces
17-
tips_and_tricks
18-
Protocol extensions <extensions.md>
16+
Refactoring Tools <refactoring_tools.md>
17+
Tips and Tricks <tips_and_tricks.rst>
18+
Ada Language Server Settings <settings.md>
19+
ALS Traces <traces.md>
20+
Language Server Protocol Extensions <extensions.md>

doc/media/delete_entity.gif

81.7 KB
Loading

doc/refactoring_tools.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* [Extract Variable](#extract-variable)
1616
* [Pull Up Declaration](#pull-up-declaration)
1717
* [Suppress Separate](#suppress-separate)
18+
* [Delete Entity](#delete-entity)
1819
* [Introduce Parameter](#introduce-parameter)
1920
* [Replace Type](#replace-type)
2021
* [Auto Import](#auto-import)
@@ -170,6 +171,24 @@ Demo source is `suppress_separate/` in [Code Samples](https://github.com/AdaCore
170171

171172
![suppress_separate](media/suppress_separate.gif)
172173

174+
## Delete Entity
175+
176+
**Command name:** `als-refactor-delete-entiry`
177+
178+
* Currently works only for procedures.
179+
* Any procedure call is also deleted.
180+
* If call statement is the only one in the statement list, then
181+
- if it is inside a declare/block/end then the block statement is deleted
182+
even if there are exception handlers and declarations in it.
183+
- otherwise it will be replaced with `null;` to keep source correct.
184+
* Non-call references will be reported and prevent the deletion.
185+
186+
See `src/lal_refactor-delete_entity.ads` in [LAL Refactor repository](https://github.com/AdaCore/lal-refactor).
187+
188+
Demo source is `delete_entity/` in [Code Samples](https://github.com/AdaCore/ada_language_server/blob/master/integration/vscode/Code%20Samples/refactoring_demos/).
189+
190+
![delete_entity](media/delete_entity.gif)
191+
173192
## Introduce Parameter
174193

175194
**Command name:** `als-refactor-introduce-parameter`

doc/settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Settings understood by the Ada Language Server itself, independently from the LS
106106
* [defaultCharset](#defaultcharset)
107107
* [relocateBuildTree](#relocatebuildtree)
108108
* [rootDir](#rootdir)
109-
* [enableDiagnostics](#enableddiagnostics)
109+
* [enableDiagnostics](#enablediagnostics)
110110
* [adaFileDiagnostics](#adafilediagnostics)
111111
* [gprFileDiagnostics](#gprfilediagnostics)
112112
* [sourceInfoDiagnostics](#sourceinfodiagnostics)

doc/tips_and_tricks.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Tips and tricks
99
Custom-colors-in-VS-Code
1010
Project-file-editing
1111
Set-workspace-specific-environment-variables
12-
Working-on-a-remote-machine.md
12+
Working-on-a-remote-machine.md

0 commit comments

Comments
 (0)