|
21 | 21 |
|
22 | 22 | ## Named Parameters
|
23 | 23 |
|
| 24 | +**Command name:** `als-named-parameters` |
| 25 | + |
24 | 26 | * Adds the formal parameter name of each actual parameter in the subprogram call.
|
25 | 27 |
|
26 | 28 | [Source](https://github.com/AdaCore/ada_language_server/blob/master/source/ada/lsp-ada_handlers-named_parameters_commands.ads)
|
|
32 | 34 |
|
33 | 35 | ## Add Parameter
|
34 | 36 |
|
| 37 | +**Command name:** `als-refactor-add-parameters` |
| 38 | + |
35 | 39 | * Adds a new parameter to a subprogram.
|
36 | 40 | * All subprogram specs are updated.
|
37 | 41 | * Only parameters with correct syntax are accepted.
|
|
46 | 50 |
|
47 | 51 | ## Remove Parameter
|
48 | 52 |
|
| 53 | +**Command name:** `als-refactor-remove-parameters` |
| 54 | + |
49 | 55 | * Removes a parameter of a subprogram.
|
50 | 56 | * All subprogram specs are updated.
|
51 | 57 | * Actual parameter is removed from the subprogram calls.
|
|
58 | 64 |
|
59 | 65 | ## Move Parameter
|
60 | 66 |
|
| 67 | +**Command name:** `als-refactor-move-parameters` |
| 68 | + |
61 | 69 | * Moves a parameter backward and forward within a subprogram spec.
|
62 | 70 | * All subprogram specs are updated.
|
63 | 71 | * Actual parameter are moved in the subprogram calls when needed.
|
|
70 | 78 |
|
71 | 79 | ## Change Parameter Mode
|
72 | 80 |
|
| 81 | +**Command name:** `als-refactor-change-parameter-mode` |
| 82 | + |
73 | 83 | * Changes the parameter mode within a subprogram spec.
|
74 | 84 | * All subprogram specs are updated.
|
75 | 85 |
|
|
81 | 91 |
|
82 | 92 | ## Change Parameter Type
|
83 | 93 |
|
| 94 | +**Command name:** `als-refactor-change_parameters_type` |
| 95 | + |
84 | 96 | * Changes the parameter subtype indication within a subprogram spec.
|
85 | 97 | * Only subtype indications with correct syntax are accepted.
|
86 | 98 | * All subprogram specs are updated.
|
|
93 | 105 |
|
94 | 106 | ## Change Parameter Default Value
|
95 | 107 |
|
| 108 | +**Command name:** `als-refactor-change_parameters_default_value` |
| 109 | + |
96 | 110 | * Changes the parameter default value expression within a subprogram spec.
|
97 | 111 | * Only default value expressions with correct syntax are accepted.
|
98 | 112 | * All subprogram specs are updated.
|
|
105 | 119 |
|
106 | 120 | ## Extract Subprogram
|
107 | 121 |
|
| 122 | +**Command name:** `als-refactor-extract-subprogram` |
| 123 | + |
108 | 124 | * Extracts statements to a new subprogram.
|
109 | 125 | * The new subprogram is created in the nearest declarative part.
|
110 | 126 | * Local declarations of for loop and exception handlers are passed to the extracted subprogram as new parameters.
|
|
118 | 134 |
|
119 | 135 | ## Pull Up Declaration
|
120 | 136 |
|
| 137 | +**Command name:** `als-refactor-pull_up_declaration` |
| 138 | + |
121 | 139 | * Moves a declaration and its dependent declarations to their parent declarative part.
|
122 | 140 | * When pulling up a subprogram, object declaration are not pulled up. Instead, they're added as formal parameters to the subprogram specification and as actual parameters to the subprogram calls.
|
123 | 141 |
|
|
129 | 147 |
|
130 | 148 | ## Suppress Separate
|
131 | 149 |
|
| 150 | +**Command name:** `als-suppress-separate` |
| 151 | + |
132 | 152 | * Moves a separate subunit to it's stub in the parent package.
|
133 | 153 | * Use clauses in the separate subunit are moved to the subprogram's declarative part to avoid namespace collisions.
|
134 | 154 | * .bak is added to the separate subunit source filename.
|
|
141 | 161 |
|
142 | 162 | ## Introduce Parameter
|
143 | 163 |
|
| 164 | +**Command name:** `als-refactor-introduce-parameter` |
| 165 | + |
144 | 166 | * Introduces a formal parameter based on an object declaration or expression inside a subprogram.
|
145 | 167 | * All references of the object declaration or expression are replaced by the introduced parameter.
|
146 | 168 | * The user must mannually fix the calls to the subprogram that was refactored by addings the corresponding actual parameter.
|
|
153 | 175 |
|
154 | 176 | ## Replace Type
|
155 | 177 |
|
| 178 | +**Command name:** `als-refactor-replace-type` |
| 179 | + |
156 | 180 | * Replaces a type in the intire project by another type provided by the user.
|
157 | 181 |
|
158 | 182 | [Source](https://github.com/AdaCore/lal-refactor/blob/main/src/lal_refactor-replace_type.ads)
|
|
163 | 187 |
|
164 | 188 | ## Auto Import
|
165 | 189 |
|
| 190 | +**Command name:** `als-auto-import` |
| 191 | + |
166 | 192 | * For an unresolved name, suggests all packages that can be imported and prefix to be added so that that the name gets resolved.
|
167 | 193 |
|
168 |
| -[Source](https://github.com/AdaCore/lal-refactor/blob/main/src/lal_refactor-refactor_imports.ads) |
| 194 | +[Source](https://github.com/AdaCore/lal-refactor/blob/edge/src/lal_refactor-auto_import.adb) |
169 | 195 |
|
170 | 196 | [Demo Source](../integration/vscode/Code%20Samples/refactoring_demos/auto_import)
|
171 | 197 |
|
172 | 198 | 
|
173 | 199 |
|
174 | 200 | ## Sort Dependencies
|
175 | 201 |
|
| 202 | +**Command name:** `als-refactor-sort_dependencies` |
| 203 | + |
176 | 204 | * Sorts all with and use clauses and their associated pragmas.
|
177 | 205 |
|
178 | 206 | [Source](https://github.com/AdaCore/lal-refactor/blob/main/src/lal_refactor-sort_dependencies.ads)
|
|
0 commit comments