OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // | 4 // |
5 // This file has been automatically generated. Please do not edit it manually. | 5 // This file has been automatically generated. Please do not edit it manually. |
6 // To regenerate the file, use the script | 6 // To regenerate the file, use the script |
7 // "pkg/analysis_server/tool/spec/generate_files". | 7 // "pkg/analysis_server/tool/spec/generate_files". |
8 | 8 |
9 /** | 9 /** |
10 * Convenience methods for running integration tests | 10 * Convenience methods for running integration tests |
(...skipping 14 matching lines...) Expand all Loading... |
25 * Convenience methods for running integration tests | 25 * Convenience methods for running integration tests |
26 */ | 26 */ |
27 abstract class IntegrationTestMixin { | 27 abstract class IntegrationTestMixin { |
28 Server get server; | 28 Server get server; |
29 | 29 |
30 /** | 30 /** |
31 * Return the version number of the analysis server. | 31 * Return the version number of the analysis server. |
32 * | 32 * |
33 * Returns | 33 * Returns |
34 * | 34 * |
35 * version ( String ) | 35 * version (String) |
36 * | 36 * |
37 * The version number of the analysis server. | 37 * The version number of the analysis server. |
38 */ | 38 */ |
39 Future<ServerGetVersionResult> sendServerGetVersion() async { | 39 Future<ServerGetVersionResult> sendServerGetVersion() async { |
40 var result = await server.send("server.getVersion", null); | 40 var result = await server.send("server.getVersion", null); |
41 ResponseDecoder decoder = new ResponseDecoder(null); | 41 ResponseDecoder decoder = new ResponseDecoder(null); |
42 return new ServerGetVersionResult.fromJson(decoder, 'result', result); | 42 return new ServerGetVersionResult.fromJson(decoder, 'result', result); |
43 } | 43 } |
44 | 44 |
45 /** | 45 /** |
(...skipping 12 matching lines...) Expand all Loading... |
58 /** | 58 /** |
59 * Subscribe for services. All previous subscriptions are replaced by the | 59 * Subscribe for services. All previous subscriptions are replaced by the |
60 * given set of services. | 60 * given set of services. |
61 * | 61 * |
62 * It is an error if any of the elements in the list are not valid services. | 62 * It is an error if any of the elements in the list are not valid services. |
63 * If there is an error, then the current subscriptions will remain | 63 * If there is an error, then the current subscriptions will remain |
64 * unchanged. | 64 * unchanged. |
65 * | 65 * |
66 * Parameters | 66 * Parameters |
67 * | 67 * |
68 * subscriptions ( List<ServerService> ) | 68 * subscriptions (List<ServerService>) |
69 * | 69 * |
70 * A list of the services being subscribed to. | 70 * A list of the services being subscribed to. |
71 */ | 71 */ |
72 Future sendServerSetSubscriptions(List<ServerService> subscriptions) async { | 72 Future sendServerSetSubscriptions(List<ServerService> subscriptions) async { |
73 var params = new ServerSetSubscriptionsParams(subscriptions).toJson(); | 73 var params = new ServerSetSubscriptionsParams(subscriptions).toJson(); |
74 var result = await server.send("server.setSubscriptions", params); | 74 var result = await server.send("server.setSubscriptions", params); |
75 expect(result, isNull); | 75 expect(result, isNull); |
76 return null; | 76 return null; |
77 } | 77 } |
78 | 78 |
79 /** | 79 /** |
80 * Reports that the server is running. This notification is issued once after | 80 * Reports that the server is running. This notification is issued once after |
81 * the server has started running but before any requests are processed to | 81 * the server has started running but before any requests are processed to |
82 * let the client know that it started correctly. | 82 * let the client know that it started correctly. |
83 * | 83 * |
84 * It is not possible to subscribe to or unsubscribe from this notification. | 84 * It is not possible to subscribe to or unsubscribe from this notification. |
85 * | 85 * |
86 * Parameters | 86 * Parameters |
87 * | 87 * |
88 * version ( String ) | 88 * version (String) |
89 * | 89 * |
90 * The version number of the analysis server. | 90 * The version number of the analysis server. |
91 * | 91 * |
92 * pid ( int ) | 92 * pid (int) |
93 * | 93 * |
94 * The process id of the analysis server process. | 94 * The process id of the analysis server process. |
95 */ | 95 */ |
96 Stream<ServerConnectedParams> onServerConnected; | 96 Stream<ServerConnectedParams> onServerConnected; |
97 | 97 |
98 /** | 98 /** |
99 * Stream controller for [onServerConnected]. | 99 * Stream controller for [onServerConnected]. |
100 */ | 100 */ |
101 StreamController<ServerConnectedParams> _onServerConnected; | 101 StreamController<ServerConnectedParams> _onServerConnected; |
102 | 102 |
103 /** | 103 /** |
104 * Reports that an unexpected error has occurred while executing the server. | 104 * Reports that an unexpected error has occurred while executing the server. |
105 * This notification is not used for problems with specific requests (which | 105 * This notification is not used for problems with specific requests (which |
106 * are returned as part of the response) but is used for exceptions that | 106 * are returned as part of the response) but is used for exceptions that |
107 * occur while performing other tasks, such as analysis or preparing | 107 * occur while performing other tasks, such as analysis or preparing |
108 * notifications. | 108 * notifications. |
109 * | 109 * |
110 * It is not possible to subscribe to or unsubscribe from this notification. | 110 * It is not possible to subscribe to or unsubscribe from this notification. |
111 * | 111 * |
112 * Parameters | 112 * Parameters |
113 * | 113 * |
114 * isFatal ( bool ) | 114 * isFatal (bool) |
115 * | 115 * |
116 * True if the error is a fatal error, meaning that the server will | 116 * True if the error is a fatal error, meaning that the server will |
117 * shutdown automatically after sending this notification. | 117 * shutdown automatically after sending this notification. |
118 * | 118 * |
119 * message ( String ) | 119 * message (String) |
120 * | 120 * |
121 * The error message indicating what kind of error was encountered. | 121 * The error message indicating what kind of error was encountered. |
122 * | 122 * |
123 * stackTrace ( String ) | 123 * stackTrace (String) |
124 * | 124 * |
125 * The stack trace associated with the generation of the error, used for | 125 * The stack trace associated with the generation of the error, used for |
126 * debugging the server. | 126 * debugging the server. |
127 */ | 127 */ |
128 Stream<ServerErrorParams> onServerError; | 128 Stream<ServerErrorParams> onServerError; |
129 | 129 |
130 /** | 130 /** |
131 * Stream controller for [onServerError]. | 131 * Stream controller for [onServerError]. |
132 */ | 132 */ |
133 StreamController<ServerErrorParams> _onServerError; | 133 StreamController<ServerErrorParams> _onServerError; |
134 | 134 |
135 /** | 135 /** |
136 * Reports the current status of the server. Parameters are omitted if there | 136 * Reports the current status of the server. Parameters are omitted if there |
137 * has been no change in the status represented by that parameter. | 137 * has been no change in the status represented by that parameter. |
138 * | 138 * |
139 * This notification is not subscribed to by default. Clients can subscribe | 139 * This notification is not subscribed to by default. Clients can subscribe |
140 * by including the value "STATUS" in the list of services passed in a | 140 * by including the value "STATUS" in the list of services passed in a |
141 * server.setSubscriptions request. | 141 * server.setSubscriptions request. |
142 * | 142 * |
143 * Parameters | 143 * Parameters |
144 * | 144 * |
145 * analysis ( optional AnalysisStatus ) | 145 * analysis (optional AnalysisStatus) |
146 * | 146 * |
147 * The current status of analysis, including whether analysis is being | 147 * The current status of analysis, including whether analysis is being |
148 * performed and if so what is being analyzed. | 148 * performed and if so what is being analyzed. |
149 * | 149 * |
150 * pub ( optional PubStatus ) | 150 * pub (optional PubStatus) |
151 * | 151 * |
152 * The current status of pub execution, indicating whether we are currently | 152 * The current status of pub execution, indicating whether we are currently |
153 * running pub. | 153 * running pub. |
154 */ | 154 */ |
155 Stream<ServerStatusParams> onServerStatus; | 155 Stream<ServerStatusParams> onServerStatus; |
156 | 156 |
157 /** | 157 /** |
158 * Stream controller for [onServerStatus]. | 158 * Stream controller for [onServerStatus]. |
159 */ | 159 */ |
160 StreamController<ServerStatusParams> _onServerStatus; | 160 StreamController<ServerStatusParams> _onServerStatus; |
(...skipping 14 matching lines...) Expand all Loading... |
175 * as it becomes available should use the information provided by the | 175 * as it becomes available should use the information provided by the |
176 * 'analysis.errors' notification. | 176 * 'analysis.errors' notification. |
177 * | 177 * |
178 * If a request is made for a file which does not exist, or which is not | 178 * If a request is made for a file which does not exist, or which is not |
179 * currently subject to analysis (e.g. because it is not associated with any | 179 * currently subject to analysis (e.g. because it is not associated with any |
180 * analysis root specified to analysis.setAnalysisRoots), an error of type | 180 * analysis root specified to analysis.setAnalysisRoots), an error of type |
181 * GET_ERRORS_INVALID_FILE will be generated. | 181 * GET_ERRORS_INVALID_FILE will be generated. |
182 * | 182 * |
183 * Parameters | 183 * Parameters |
184 * | 184 * |
185 * file ( FilePath ) | 185 * file (FilePath) |
186 * | 186 * |
187 * The file for which errors are being requested. | 187 * The file for which errors are being requested. |
188 * | 188 * |
189 * Returns | 189 * Returns |
190 * | 190 * |
191 * errors ( List<AnalysisError> ) | 191 * errors (List<AnalysisError>) |
192 * | 192 * |
193 * The errors associated with the file. | 193 * The errors associated with the file. |
194 */ | 194 */ |
195 Future<AnalysisGetErrorsResult> sendAnalysisGetErrors(String file) async { | 195 Future<AnalysisGetErrorsResult> sendAnalysisGetErrors(String file) async { |
196 var params = new AnalysisGetErrorsParams(file).toJson(); | 196 var params = new AnalysisGetErrorsParams(file).toJson(); |
197 var result = await server.send("analysis.getErrors", params); | 197 var result = await server.send("analysis.getErrors", params); |
198 ResponseDecoder decoder = new ResponseDecoder(null); | 198 ResponseDecoder decoder = new ResponseDecoder(null); |
199 return new AnalysisGetErrorsResult.fromJson(decoder, 'result', result); | 199 return new AnalysisGetErrorsResult.fromJson(decoder, 'result', result); |
200 } | 200 } |
201 | 201 |
202 /** | 202 /** |
203 * Return the hover information associate with the given location. If some or | 203 * Return the hover information associate with the given location. If some or |
204 * all of the hover information is not available at the time this request is | 204 * all of the hover information is not available at the time this request is |
205 * processed the information will be omitted from the response. | 205 * processed the information will be omitted from the response. |
206 * | 206 * |
207 * Parameters | 207 * Parameters |
208 * | 208 * |
209 * file ( FilePath ) | 209 * file (FilePath) |
210 * | 210 * |
211 * The file in which hover information is being requested. | 211 * The file in which hover information is being requested. |
212 * | 212 * |
213 * offset ( int ) | 213 * offset (int) |
214 * | 214 * |
215 * The offset for which hover information is being requested. | 215 * The offset for which hover information is being requested. |
216 * | 216 * |
217 * Returns | 217 * Returns |
218 * | 218 * |
219 * hovers ( List<HoverInformation> ) | 219 * hovers (List<HoverInformation>) |
220 * | 220 * |
221 * The hover information associated with the location. The list will be | 221 * The hover information associated with the location. The list will be |
222 * empty if no information could be determined for the location. The list | 222 * empty if no information could be determined for the location. The list |
223 * can contain multiple items if the file is being analyzed in multiple | 223 * can contain multiple items if the file is being analyzed in multiple |
224 * contexts in conflicting ways (such as a part that is included in | 224 * contexts in conflicting ways (such as a part that is included in |
225 * multiple libraries). | 225 * multiple libraries). |
226 */ | 226 */ |
227 Future<AnalysisGetHoverResult> sendAnalysisGetHover(String file, int offset) a
sync { | 227 Future<AnalysisGetHoverResult> sendAnalysisGetHover(String file, int offset) a
sync { |
228 var params = new AnalysisGetHoverParams(file, offset).toJson(); | 228 var params = new AnalysisGetHoverParams(file, offset).toJson(); |
229 var result = await server.send("analysis.getHover", params); | 229 var result = await server.send("analysis.getHover", params); |
230 ResponseDecoder decoder = new ResponseDecoder(null); | 230 ResponseDecoder decoder = new ResponseDecoder(null); |
231 return new AnalysisGetHoverResult.fromJson(decoder, 'result', result); | 231 return new AnalysisGetHoverResult.fromJson(decoder, 'result', result); |
232 } | 232 } |
233 | 233 |
234 /** | 234 /** |
235 * Return the transitive closure of reachable sources for a given file. | 235 * Return the transitive closure of reachable sources for a given file. |
236 * | 236 * |
237 * If a request is made for a file which does not exist, or which is not | 237 * If a request is made for a file which does not exist, or which is not |
238 * currently subject to analysis (e.g. because it is not associated with any | 238 * currently subject to analysis (e.g. because it is not associated with any |
239 * analysis root specified to analysis.setAnalysisRoots), an error of type | 239 * analysis root specified to analysis.setAnalysisRoots), an error of type |
240 * GET_REACHABLE_SOURCES_INVALID_FILE will be generated. | 240 * GET_REACHABLE_SOURCES_INVALID_FILE will be generated. |
241 * | 241 * |
242 * Parameters | 242 * Parameters |
243 * | 243 * |
244 * file ( FilePath ) | 244 * file (FilePath) |
245 * | 245 * |
246 * The file for which reachable source information is being requested. | 246 * The file for which reachable source information is being requested. |
247 * | 247 * |
248 * Returns | 248 * Returns |
249 * | 249 * |
250 * sources ( Map<String, List<String>> ) | 250 * sources (Map<String, List<String>>) |
251 * | 251 * |
252 * A mapping from source URIs to directly reachable source URIs. For | 252 * A mapping from source URIs to directly reachable source URIs. For |
253 * example, a file "foo.dart" that imports "bar.dart" would have the | 253 * example, a file "foo.dart" that imports "bar.dart" would have the |
254 * corresponding mapping { "file:///foo.dart" : ["file:///bar.dart"] }. If | 254 * corresponding mapping { "file:///foo.dart" : ["file:///bar.dart"] }. If |
255 * "bar.dart" has further imports (or exports) there will be a mapping from | 255 * "bar.dart" has further imports (or exports) there will be a mapping from |
256 * the URI "file:///bar.dart" to them. To check if a specific URI is | 256 * the URI "file:///bar.dart" to them. To check if a specific URI is |
257 * reachable from a given file, clients can check for its presence in the | 257 * reachable from a given file, clients can check for its presence in the |
258 * resulting key set. | 258 * resulting key set. |
259 */ | 259 */ |
260 Future<AnalysisGetReachableSourcesResult> sendAnalysisGetReachableSources(Stri
ng file) async { | 260 Future<AnalysisGetReachableSourcesResult> sendAnalysisGetReachableSources(Stri
ng file) async { |
261 var params = new AnalysisGetReachableSourcesParams(file).toJson(); | 261 var params = new AnalysisGetReachableSourcesParams(file).toJson(); |
262 var result = await server.send("analysis.getReachableSources", params); | 262 var result = await server.send("analysis.getReachableSources", params); |
263 ResponseDecoder decoder = new ResponseDecoder(null); | 263 ResponseDecoder decoder = new ResponseDecoder(null); |
264 return new AnalysisGetReachableSourcesResult.fromJson(decoder, 'result', res
ult); | 264 return new AnalysisGetReachableSourcesResult.fromJson(decoder, 'result', res
ult); |
265 } | 265 } |
266 | 266 |
267 /** | 267 /** |
268 * Return library dependency information for use in client-side indexing and | 268 * Return library dependency information for use in client-side indexing and |
269 * package URI resolution. | 269 * package URI resolution. |
270 * | 270 * |
271 * Clients that are only using the libraries field should consider using the | 271 * Clients that are only using the libraries field should consider using the |
272 * analyzedFiles notification instead. | 272 * analyzedFiles notification instead. |
273 * | 273 * |
274 * Returns | 274 * Returns |
275 * | 275 * |
276 * libraries ( List<FilePath> ) | 276 * libraries (List<FilePath>) |
277 * | 277 * |
278 * A list of the paths of library elements referenced by files in existing | 278 * A list of the paths of library elements referenced by files in existing |
279 * analysis roots. | 279 * analysis roots. |
280 * | 280 * |
281 * packageMap ( Map<String, Map<String, List<FilePath>>> ) | 281 * packageMap (Map<String, Map<String, List<FilePath>>>) |
282 * | 282 * |
283 * A mapping from context source roots to package maps which map package | 283 * A mapping from context source roots to package maps which map package |
284 * names to source directories for use in client-side package URI | 284 * names to source directories for use in client-side package URI |
285 * resolution. | 285 * resolution. |
286 */ | 286 */ |
287 Future<AnalysisGetLibraryDependenciesResult> sendAnalysisGetLibraryDependencie
s() async { | 287 Future<AnalysisGetLibraryDependenciesResult> sendAnalysisGetLibraryDependencie
s() async { |
288 var result = await server.send("analysis.getLibraryDependencies", null); | 288 var result = await server.send("analysis.getLibraryDependencies", null); |
289 ResponseDecoder decoder = new ResponseDecoder(null); | 289 ResponseDecoder decoder = new ResponseDecoder(null); |
290 return new AnalysisGetLibraryDependenciesResult.fromJson(decoder, 'result',
result); | 290 return new AnalysisGetLibraryDependenciesResult.fromJson(decoder, 'result',
result); |
291 } | 291 } |
(...skipping 14 matching lines...) Expand all Loading... |
306 * region that starts at the beginning of a line and ends at the end of a | 306 * region that starts at the beginning of a line and ends at the end of a |
307 * (possibly different) line in the file. | 307 * (possibly different) line in the file. |
308 * | 308 * |
309 * If a request is made for a file which does not exist, or which is not | 309 * If a request is made for a file which does not exist, or which is not |
310 * currently subject to analysis (e.g. because it is not associated with any | 310 * currently subject to analysis (e.g. because it is not associated with any |
311 * analysis root specified to analysis.setAnalysisRoots), an error of type | 311 * analysis root specified to analysis.setAnalysisRoots), an error of type |
312 * GET_NAVIGATION_INVALID_FILE will be generated. | 312 * GET_NAVIGATION_INVALID_FILE will be generated. |
313 * | 313 * |
314 * Parameters | 314 * Parameters |
315 * | 315 * |
316 * file ( FilePath ) | 316 * file (FilePath) |
317 * | 317 * |
318 * The file in which navigation information is being requested. | 318 * The file in which navigation information is being requested. |
319 * | 319 * |
320 * offset ( int ) | 320 * offset (int) |
321 * | 321 * |
322 * The offset of the region for which navigation information is being | 322 * The offset of the region for which navigation information is being |
323 * requested. | 323 * requested. |
324 * | 324 * |
325 * length ( int ) | 325 * length (int) |
326 * | 326 * |
327 * The length of the region for which navigation information is being | 327 * The length of the region for which navigation information is being |
328 * requested. | 328 * requested. |
329 * | 329 * |
330 * Returns | 330 * Returns |
331 * | 331 * |
332 * files ( List<FilePath> ) | 332 * files (List<FilePath>) |
333 * | 333 * |
334 * A list of the paths of files that are referenced by the navigation | 334 * A list of the paths of files that are referenced by the navigation |
335 * targets. | 335 * targets. |
336 * | 336 * |
337 * targets ( List<NavigationTarget> ) | 337 * targets (List<NavigationTarget>) |
338 * | 338 * |
339 * A list of the navigation targets that are referenced by the navigation | 339 * A list of the navigation targets that are referenced by the navigation |
340 * regions. | 340 * regions. |
341 * | 341 * |
342 * regions ( List<NavigationRegion> ) | 342 * regions (List<NavigationRegion>) |
343 * | 343 * |
344 * A list of the navigation regions within the requested region of the | 344 * A list of the navigation regions within the requested region of the |
345 * file. | 345 * file. |
346 */ | 346 */ |
347 Future<AnalysisGetNavigationResult> sendAnalysisGetNavigation(String file, int
offset, int length) async { | 347 Future<AnalysisGetNavigationResult> sendAnalysisGetNavigation(String file, int
offset, int length) async { |
348 var params = new AnalysisGetNavigationParams(file, offset, length).toJson(); | 348 var params = new AnalysisGetNavigationParams(file, offset, length).toJson(); |
349 var result = await server.send("analysis.getNavigation", params); | 349 var result = await server.send("analysis.getNavigation", params); |
350 ResponseDecoder decoder = new ResponseDecoder(null); | 350 ResponseDecoder decoder = new ResponseDecoder(null); |
351 return new AnalysisGetNavigationResult.fromJson(decoder, 'result', result); | 351 return new AnalysisGetNavigationResult.fromJson(decoder, 'result', result); |
352 } | 352 } |
353 | 353 |
354 /** | 354 /** |
355 * Force the re-analysis of everything contained in the specified analysis | 355 * Force the re-analysis of everything contained in the specified analysis |
356 * roots. This will cause all previously computed analysis results to be | 356 * roots. This will cause all previously computed analysis results to be |
357 * discarded and recomputed, and will cause all subscribed notifications to | 357 * discarded and recomputed, and will cause all subscribed notifications to |
358 * be re-sent. | 358 * be re-sent. |
359 * | 359 * |
360 * If no analysis roots are provided, then all current analysis roots will be | 360 * If no analysis roots are provided, then all current analysis roots will be |
361 * re-analyzed. If an empty list of analysis roots is provided, then nothing | 361 * re-analyzed. If an empty list of analysis roots is provided, then nothing |
362 * will be re-analyzed. If the list contains one or more paths that are not | 362 * will be re-analyzed. If the list contains one or more paths that are not |
363 * currently analysis roots, then an error of type INVALID_ANALYSIS_ROOT will | 363 * currently analysis roots, then an error of type INVALID_ANALYSIS_ROOT will |
364 * be generated. | 364 * be generated. |
365 * | 365 * |
366 * Parameters | 366 * Parameters |
367 * | 367 * |
368 * roots ( optional List<FilePath> ) | 368 * roots (optional List<FilePath>) |
369 * | 369 * |
370 * A list of the analysis roots that are to be re-analyzed. | 370 * A list of the analysis roots that are to be re-analyzed. |
371 */ | 371 */ |
372 Future sendAnalysisReanalyze({List<String> roots}) async { | 372 Future sendAnalysisReanalyze({List<String> roots}) async { |
373 var params = new AnalysisReanalyzeParams(roots: roots).toJson(); | 373 var params = new AnalysisReanalyzeParams(roots: roots).toJson(); |
374 var result = await server.send("analysis.reanalyze", params); | 374 var result = await server.send("analysis.reanalyze", params); |
375 expect(result, isNull); | 375 expect(result, isNull); |
376 return null; | 376 return null; |
377 } | 377 } |
378 | 378 |
(...skipping 18 matching lines...) Expand all Loading... |
397 * system but they will remain in the set of requested roots. | 397 * system but they will remain in the set of requested roots. |
398 * | 398 * |
399 * If an included path represents a file, then server will look in the | 399 * If an included path represents a file, then server will look in the |
400 * directory containing the file for a pubspec.yaml file. If none is found, | 400 * directory containing the file for a pubspec.yaml file. If none is found, |
401 * then the parents of the directory will be searched until such a file is | 401 * then the parents of the directory will be searched until such a file is |
402 * found or the root of the file system is reached. If such a file is found, | 402 * found or the root of the file system is reached. If such a file is found, |
403 * it will be used to resolve package: URI’s within the file. | 403 * it will be used to resolve package: URI’s within the file. |
404 * | 404 * |
405 * Parameters | 405 * Parameters |
406 * | 406 * |
407 * included ( List<FilePath> ) | 407 * included (List<FilePath>) |
408 * | 408 * |
409 * A list of the files and directories that should be analyzed. | 409 * A list of the files and directories that should be analyzed. |
410 * | 410 * |
411 * excluded ( List<FilePath> ) | 411 * excluded (List<FilePath>) |
412 * | 412 * |
413 * A list of the files and directories within the included directories that | 413 * A list of the files and directories within the included directories that |
414 * should not be analyzed. | 414 * should not be analyzed. |
415 * | 415 * |
416 * packageRoots ( optional Map<FilePath, FilePath> ) | 416 * packageRoots (optional Map<FilePath, FilePath>) |
417 * | 417 * |
418 * A mapping from source directories to package roots that should override | 418 * A mapping from source directories to package roots that should override |
419 * the normal package: URI resolution mechanism. | 419 * the normal package: URI resolution mechanism. |
420 * | 420 * |
421 * If a package root is a directory, then the analyzer will behave as | 421 * If a package root is a directory, then the analyzer will behave as |
422 * though the associated source directory in the map contains a special | 422 * though the associated source directory in the map contains a special |
423 * pubspec.yaml file which resolves any package: URI to the corresponding | 423 * pubspec.yaml file which resolves any package: URI to the corresponding |
424 * path within that package root directory. The effect is the same as | 424 * path within that package root directory. The effect is the same as |
425 * specifying the package root directory as a "--package_root" parameter to | 425 * specifying the package root directory as a "--package_root" parameter to |
426 * the Dart VM when executing any Dart file inside the source directory. | 426 * the Dart VM when executing any Dart file inside the source directory. |
(...skipping 19 matching lines...) Expand all Loading... |
446 * Subscribe for general services (that is, services that are not specific to | 446 * Subscribe for general services (that is, services that are not specific to |
447 * individual files). All previous subscriptions are replaced by the given | 447 * individual files). All previous subscriptions are replaced by the given |
448 * set of services. | 448 * set of services. |
449 * | 449 * |
450 * It is an error if any of the elements in the list are not valid services. | 450 * It is an error if any of the elements in the list are not valid services. |
451 * If there is an error, then the current subscriptions will remain | 451 * If there is an error, then the current subscriptions will remain |
452 * unchanged. | 452 * unchanged. |
453 * | 453 * |
454 * Parameters | 454 * Parameters |
455 * | 455 * |
456 * subscriptions ( List<GeneralAnalysisService> ) | 456 * subscriptions (List<GeneralAnalysisService>) |
457 * | 457 * |
458 * A list of the services being subscribed to. | 458 * A list of the services being subscribed to. |
459 */ | 459 */ |
460 Future sendAnalysisSetGeneralSubscriptions(List<GeneralAnalysisService> subscr
iptions) async { | 460 Future sendAnalysisSetGeneralSubscriptions(List<GeneralAnalysisService> subscr
iptions) async { |
461 var params = new AnalysisSetGeneralSubscriptionsParams(subscriptions).toJson
(); | 461 var params = new AnalysisSetGeneralSubscriptionsParams(subscriptions).toJson
(); |
462 var result = await server.send("analysis.setGeneralSubscriptions", params); | 462 var result = await server.send("analysis.setGeneralSubscriptions", params); |
463 expect(result, isNull); | 463 expect(result, isNull); |
464 return null; | 464 return null; |
465 } | 465 } |
466 | 466 |
(...skipping 11 matching lines...) Expand all Loading... |
478 * priority files with the set of files currently subject to analysis. (See | 478 * priority files with the set of files currently subject to analysis. (See |
479 * analysis.setSubscriptions for a description of files that are subject to | 479 * analysis.setSubscriptions for a description of files that are subject to |
480 * analysis.) | 480 * analysis.) |
481 * | 481 * |
482 * If a requested priority file is a directory it is ignored, but remains in | 482 * If a requested priority file is a directory it is ignored, but remains in |
483 * the set of requested priority files so that if it later becomes a file it | 483 * the set of requested priority files so that if it later becomes a file it |
484 * can be included in the set of actual priority files. | 484 * can be included in the set of actual priority files. |
485 * | 485 * |
486 * Parameters | 486 * Parameters |
487 * | 487 * |
488 * files ( List<FilePath> ) | 488 * files (List<FilePath>) |
489 * | 489 * |
490 * The files that are to be a priority for analysis. | 490 * The files that are to be a priority for analysis. |
491 */ | 491 */ |
492 Future sendAnalysisSetPriorityFiles(List<String> files) async { | 492 Future sendAnalysisSetPriorityFiles(List<String> files) async { |
493 var params = new AnalysisSetPriorityFilesParams(files).toJson(); | 493 var params = new AnalysisSetPriorityFilesParams(files).toJson(); |
494 var result = await server.send("analysis.setPriorityFiles", params); | 494 var result = await server.send("analysis.setPriorityFiles", params); |
495 expect(result, isNull); | 495 expect(result, isNull); |
496 return null; | 496 return null; |
497 } | 497 } |
498 | 498 |
(...skipping 17 matching lines...) Expand all Loading... |
516 * | 516 * |
517 * If a requested subscription is a directory it is ignored, but remains in | 517 * If a requested subscription is a directory it is ignored, but remains in |
518 * the set of requested subscriptions so that if it later becomes a file it | 518 * the set of requested subscriptions so that if it later becomes a file it |
519 * can be included in the set of actual subscriptions. | 519 * can be included in the set of actual subscriptions. |
520 * | 520 * |
521 * It is an error if any of the keys in the map are not valid services. If | 521 * It is an error if any of the keys in the map are not valid services. If |
522 * there is an error, then the existing subscriptions will remain unchanged. | 522 * there is an error, then the existing subscriptions will remain unchanged. |
523 * | 523 * |
524 * Parameters | 524 * Parameters |
525 * | 525 * |
526 * subscriptions ( Map<AnalysisService, List<FilePath>> ) | 526 * subscriptions (Map<AnalysisService, List<FilePath>>) |
527 * | 527 * |
528 * A table mapping services to a list of the files being subscribed to the | 528 * A table mapping services to a list of the files being subscribed to the |
529 * service. | 529 * service. |
530 */ | 530 */ |
531 Future sendAnalysisSetSubscriptions(Map<AnalysisService, List<String>> subscri
ptions) async { | 531 Future sendAnalysisSetSubscriptions(Map<AnalysisService, List<String>> subscri
ptions) async { |
532 var params = new AnalysisSetSubscriptionsParams(subscriptions).toJson(); | 532 var params = new AnalysisSetSubscriptionsParams(subscriptions).toJson(); |
533 var result = await server.send("analysis.setSubscriptions", params); | 533 var result = await server.send("analysis.setSubscriptions", params); |
534 expect(result, isNull); | 534 expect(result, isNull); |
535 return null; | 535 return null; |
536 } | 536 } |
537 | 537 |
538 /** | 538 /** |
539 * Update the content of one or more files. Files that were previously | 539 * Update the content of one or more files. Files that were previously |
540 * updated but not included in this update remain unchanged. This effectively | 540 * updated but not included in this update remain unchanged. This effectively |
541 * represents an overlay of the filesystem. The files whose content is | 541 * represents an overlay of the filesystem. The files whose content is |
542 * overridden are therefore seen by server as being files with the given | 542 * overridden are therefore seen by server as being files with the given |
543 * content, even if the files do not exist on the filesystem or if the file | 543 * content, even if the files do not exist on the filesystem or if the file |
544 * path represents the path to a directory on the filesystem. | 544 * path represents the path to a directory on the filesystem. |
545 * | 545 * |
546 * Parameters | 546 * Parameters |
547 * | 547 * |
548 * files ( Map<FilePath, AddContentOverlay | ChangeContentOverlay | | 548 * files (Map<FilePath, AddContentOverlay | ChangeContentOverlay | |
549 * RemoveContentOverlay> ) | 549 * RemoveContentOverlay>) |
550 * | 550 * |
551 * A table mapping the files whose content has changed to a description of | 551 * A table mapping the files whose content has changed to a description of |
552 * the content change. | 552 * the content change. |
553 * | 553 * |
554 * Returns | 554 * Returns |
555 */ | 555 */ |
556 Future<AnalysisUpdateContentResult> sendAnalysisUpdateContent(Map<String, dyna
mic> files) async { | 556 Future<AnalysisUpdateContentResult> sendAnalysisUpdateContent(Map<String, dyna
mic> files) async { |
557 var params = new AnalysisUpdateContentParams(files).toJson(); | 557 var params = new AnalysisUpdateContentParams(files).toJson(); |
558 var result = await server.send("analysis.updateContent", params); | 558 var result = await server.send("analysis.updateContent", params); |
559 ResponseDecoder decoder = new ResponseDecoder(null); | 559 ResponseDecoder decoder = new ResponseDecoder(null); |
560 return new AnalysisUpdateContentResult.fromJson(decoder, 'result', result); | 560 return new AnalysisUpdateContentResult.fromJson(decoder, 'result', result); |
561 } | 561 } |
562 | 562 |
563 /** | 563 /** |
564 * Update the options controlling analysis based on the given set of options. | 564 * Update the options controlling analysis based on the given set of options. |
565 * Any options that are not included in the analysis options will not be | 565 * Any options that are not included in the analysis options will not be |
566 * changed. If there are options in the analysis options that are not valid, | 566 * changed. If there are options in the analysis options that are not valid, |
567 * they will be silently ignored. | 567 * they will be silently ignored. |
568 * | 568 * |
569 * Parameters | 569 * Parameters |
570 * | 570 * |
571 * options ( AnalysisOptions ) | 571 * options (AnalysisOptions) |
572 * | 572 * |
573 * The options that are to be used to control analysis. | 573 * The options that are to be used to control analysis. |
574 */ | 574 */ |
575 Future sendAnalysisUpdateOptions(AnalysisOptions options) async { | 575 Future sendAnalysisUpdateOptions(AnalysisOptions options) async { |
576 var params = new AnalysisUpdateOptionsParams(options).toJson(); | 576 var params = new AnalysisUpdateOptionsParams(options).toJson(); |
577 var result = await server.send("analysis.updateOptions", params); | 577 var result = await server.send("analysis.updateOptions", params); |
578 expect(result, isNull); | 578 expect(result, isNull); |
579 return null; | 579 return null; |
580 } | 580 } |
581 | 581 |
582 /** | 582 /** |
583 * Reports the paths of the files that are being analyzed. | 583 * Reports the paths of the files that are being analyzed. |
584 * | 584 * |
585 * This notification is not subscribed to by default. Clients can subscribe | 585 * This notification is not subscribed to by default. Clients can subscribe |
586 * by including the value "ANALYZED_FILES" in the list of services passed in | 586 * by including the value "ANALYZED_FILES" in the list of services passed in |
587 * an analysis.setGeneralSubscriptions request. | 587 * an analysis.setGeneralSubscriptions request. |
588 * | 588 * |
589 * Parameters | 589 * Parameters |
590 * | 590 * |
591 * directories ( List<FilePath> ) | 591 * directories (List<FilePath>) |
592 * | 592 * |
593 * A list of the paths of the files that are being analyzed. | 593 * A list of the paths of the files that are being analyzed. |
594 */ | 594 */ |
595 Stream<AnalysisAnalyzedFilesParams> onAnalysisAnalyzedFiles; | 595 Stream<AnalysisAnalyzedFilesParams> onAnalysisAnalyzedFiles; |
596 | 596 |
597 /** | 597 /** |
598 * Stream controller for [onAnalysisAnalyzedFiles]. | 598 * Stream controller for [onAnalysisAnalyzedFiles]. |
599 */ | 599 */ |
600 StreamController<AnalysisAnalyzedFilesParams> _onAnalysisAnalyzedFiles; | 600 StreamController<AnalysisAnalyzedFilesParams> _onAnalysisAnalyzedFiles; |
601 | 601 |
602 /** | 602 /** |
603 * Reports the errors associated with a given file. The set of errors | 603 * Reports the errors associated with a given file. The set of errors |
604 * included in the notification is always a complete list that supersedes any | 604 * included in the notification is always a complete list that supersedes any |
605 * previously reported errors. | 605 * previously reported errors. |
606 * | 606 * |
607 * It is only possible to unsubscribe from this notification by using the | 607 * It is only possible to unsubscribe from this notification by using the |
608 * command-line flag --no-error-notification. | 608 * command-line flag --no-error-notification. |
609 * | 609 * |
610 * Parameters | 610 * Parameters |
611 * | 611 * |
612 * file ( FilePath ) | 612 * file (FilePath) |
613 * | 613 * |
614 * The file containing the errors. | 614 * The file containing the errors. |
615 * | 615 * |
616 * errors ( List<AnalysisError> ) | 616 * errors (List<AnalysisError>) |
617 * | 617 * |
618 * The errors contained in the file. | 618 * The errors contained in the file. |
619 */ | 619 */ |
620 Stream<AnalysisErrorsParams> onAnalysisErrors; | 620 Stream<AnalysisErrorsParams> onAnalysisErrors; |
621 | 621 |
622 /** | 622 /** |
623 * Stream controller for [onAnalysisErrors]. | 623 * Stream controller for [onAnalysisErrors]. |
624 */ | 624 */ |
625 StreamController<AnalysisErrorsParams> _onAnalysisErrors; | 625 StreamController<AnalysisErrorsParams> _onAnalysisErrors; |
626 | 626 |
627 /** | 627 /** |
628 * Reports that any analysis results that were previously associated with the | 628 * Reports that any analysis results that were previously associated with the |
629 * given files should be considered to be invalid because those files are no | 629 * given files should be considered to be invalid because those files are no |
630 * longer being analyzed, either because the analysis root that contained it | 630 * longer being analyzed, either because the analysis root that contained it |
631 * is no longer being analyzed or because the file no longer exists. | 631 * is no longer being analyzed or because the file no longer exists. |
632 * | 632 * |
633 * If a file is included in this notification and at some later time a | 633 * If a file is included in this notification and at some later time a |
634 * notification with results for the file is received, clients should assume | 634 * notification with results for the file is received, clients should assume |
635 * that the file is once again being analyzed and the information should be | 635 * that the file is once again being analyzed and the information should be |
636 * processed. | 636 * processed. |
637 * | 637 * |
638 * It is not possible to subscribe to or unsubscribe from this notification. | 638 * It is not possible to subscribe to or unsubscribe from this notification. |
639 * | 639 * |
640 * Parameters | 640 * Parameters |
641 * | 641 * |
642 * files ( List<FilePath> ) | 642 * files (List<FilePath>) |
643 * | 643 * |
644 * The files that are no longer being analyzed. | 644 * The files that are no longer being analyzed. |
645 */ | 645 */ |
646 Stream<AnalysisFlushResultsParams> onAnalysisFlushResults; | 646 Stream<AnalysisFlushResultsParams> onAnalysisFlushResults; |
647 | 647 |
648 /** | 648 /** |
649 * Stream controller for [onAnalysisFlushResults]. | 649 * Stream controller for [onAnalysisFlushResults]. |
650 */ | 650 */ |
651 StreamController<AnalysisFlushResultsParams> _onAnalysisFlushResults; | 651 StreamController<AnalysisFlushResultsParams> _onAnalysisFlushResults; |
652 | 652 |
653 /** | 653 /** |
654 * Reports the folding regions associated with a given file. Folding regions | 654 * Reports the folding regions associated with a given file. Folding regions |
655 * can be nested, but will not be overlapping. Nesting occurs when a foldable | 655 * can be nested, but will not be overlapping. Nesting occurs when a foldable |
656 * element, such as a method, is nested inside another foldable element such | 656 * element, such as a method, is nested inside another foldable element such |
657 * as a class. | 657 * as a class. |
658 * | 658 * |
659 * This notification is not subscribed to by default. Clients can subscribe | 659 * This notification is not subscribed to by default. Clients can subscribe |
660 * by including the value "FOLDING" in the list of services passed in an | 660 * by including the value "FOLDING" in the list of services passed in an |
661 * analysis.setSubscriptions request. | 661 * analysis.setSubscriptions request. |
662 * | 662 * |
663 * Parameters | 663 * Parameters |
664 * | 664 * |
665 * file ( FilePath ) | 665 * file (FilePath) |
666 * | 666 * |
667 * The file containing the folding regions. | 667 * The file containing the folding regions. |
668 * | 668 * |
669 * regions ( List<FoldingRegion> ) | 669 * regions (List<FoldingRegion>) |
670 * | 670 * |
671 * The folding regions contained in the file. | 671 * The folding regions contained in the file. |
672 */ | 672 */ |
673 Stream<AnalysisFoldingParams> onAnalysisFolding; | 673 Stream<AnalysisFoldingParams> onAnalysisFolding; |
674 | 674 |
675 /** | 675 /** |
676 * Stream controller for [onAnalysisFolding]. | 676 * Stream controller for [onAnalysisFolding]. |
677 */ | 677 */ |
678 StreamController<AnalysisFoldingParams> _onAnalysisFolding; | 678 StreamController<AnalysisFoldingParams> _onAnalysisFolding; |
679 | 679 |
680 /** | 680 /** |
681 * Reports the highlight regions associated with a given file. | 681 * Reports the highlight regions associated with a given file. |
682 * | 682 * |
683 * This notification is not subscribed to by default. Clients can subscribe | 683 * This notification is not subscribed to by default. Clients can subscribe |
684 * by including the value "HIGHLIGHTS" in the list of services passed in an | 684 * by including the value "HIGHLIGHTS" in the list of services passed in an |
685 * analysis.setSubscriptions request. | 685 * analysis.setSubscriptions request. |
686 * | 686 * |
687 * Parameters | 687 * Parameters |
688 * | 688 * |
689 * file ( FilePath ) | 689 * file (FilePath) |
690 * | 690 * |
691 * The file containing the highlight regions. | 691 * The file containing the highlight regions. |
692 * | 692 * |
693 * regions ( List<HighlightRegion> ) | 693 * regions (List<HighlightRegion>) |
694 * | 694 * |
695 * The highlight regions contained in the file. Each highlight region | 695 * The highlight regions contained in the file. Each highlight region |
696 * represents a particular syntactic or semantic meaning associated with | 696 * represents a particular syntactic or semantic meaning associated with |
697 * some range. Note that the highlight regions that are returned can | 697 * some range. Note that the highlight regions that are returned can |
698 * overlap other highlight regions if there is more than one meaning | 698 * overlap other highlight regions if there is more than one meaning |
699 * associated with a particular region. | 699 * associated with a particular region. |
700 */ | 700 */ |
701 Stream<AnalysisHighlightsParams> onAnalysisHighlights; | 701 Stream<AnalysisHighlightsParams> onAnalysisHighlights; |
702 | 702 |
703 /** | 703 /** |
704 * Stream controller for [onAnalysisHighlights]. | 704 * Stream controller for [onAnalysisHighlights]. |
705 */ | 705 */ |
706 StreamController<AnalysisHighlightsParams> _onAnalysisHighlights; | 706 StreamController<AnalysisHighlightsParams> _onAnalysisHighlights; |
707 | 707 |
708 /** | 708 /** |
709 * Reports the classes that are implemented or extended and class members | 709 * Reports the classes that are implemented or extended and class members |
710 * that are implemented or overridden in a file. | 710 * that are implemented or overridden in a file. |
711 * | 711 * |
712 * This notification is not subscribed to by default. Clients can subscribe | 712 * This notification is not subscribed to by default. Clients can subscribe |
713 * by including the value "IMPLEMENTED" in the list of services passed in an | 713 * by including the value "IMPLEMENTED" in the list of services passed in an |
714 * analysis.setSubscriptions request. | 714 * analysis.setSubscriptions request. |
715 * | 715 * |
716 * Parameters | 716 * Parameters |
717 * | 717 * |
718 * file ( FilePath ) | 718 * file (FilePath) |
719 * | 719 * |
720 * The file with which the implementations are associated. | 720 * The file with which the implementations are associated. |
721 * | 721 * |
722 * classes ( List<ImplementedClass> ) | 722 * classes (List<ImplementedClass>) |
723 * | 723 * |
724 * The classes defined in the file that are implemented or extended. | 724 * The classes defined in the file that are implemented or extended. |
725 * | 725 * |
726 * members ( List<ImplementedMember> ) | 726 * members (List<ImplementedMember>) |
727 * | 727 * |
728 * The member defined in the file that are implemented or overridden. | 728 * The member defined in the file that are implemented or overridden. |
729 */ | 729 */ |
730 Stream<AnalysisImplementedParams> onAnalysisImplemented; | 730 Stream<AnalysisImplementedParams> onAnalysisImplemented; |
731 | 731 |
732 /** | 732 /** |
733 * Stream controller for [onAnalysisImplemented]. | 733 * Stream controller for [onAnalysisImplemented]. |
734 */ | 734 */ |
735 StreamController<AnalysisImplementedParams> _onAnalysisImplemented; | 735 StreamController<AnalysisImplementedParams> _onAnalysisImplemented; |
736 | 736 |
737 /** | 737 /** |
738 * Reports that the navigation information associated with a region of a | 738 * Reports that the navigation information associated with a region of a |
739 * single file has become invalid and should be re-requested. | 739 * single file has become invalid and should be re-requested. |
740 * | 740 * |
741 * This notification is not subscribed to by default. Clients can subscribe | 741 * This notification is not subscribed to by default. Clients can subscribe |
742 * by including the value "INVALIDATE" in the list of services passed in an | 742 * by including the value "INVALIDATE" in the list of services passed in an |
743 * analysis.setSubscriptions request. | 743 * analysis.setSubscriptions request. |
744 * | 744 * |
745 * Parameters | 745 * Parameters |
746 * | 746 * |
747 * file ( FilePath ) | 747 * file (FilePath) |
748 * | 748 * |
749 * The file whose information has been invalidated. | 749 * The file whose information has been invalidated. |
750 * | 750 * |
751 * offset ( int ) | 751 * offset (int) |
752 * | 752 * |
753 * The offset of the invalidated region. | 753 * The offset of the invalidated region. |
754 * | 754 * |
755 * length ( int ) | 755 * length (int) |
756 * | 756 * |
757 * The length of the invalidated region. | 757 * The length of the invalidated region. |
758 * | 758 * |
759 * delta ( int ) | 759 * delta (int) |
760 * | 760 * |
761 * The delta to be applied to the offsets in information that follows the | 761 * The delta to be applied to the offsets in information that follows the |
762 * invalidated region in order to update it so that it doesn't need to be | 762 * invalidated region in order to update it so that it doesn't need to be |
763 * re-requested. | 763 * re-requested. |
764 */ | 764 */ |
765 Stream<AnalysisInvalidateParams> onAnalysisInvalidate; | 765 Stream<AnalysisInvalidateParams> onAnalysisInvalidate; |
766 | 766 |
767 /** | 767 /** |
768 * Stream controller for [onAnalysisInvalidate]. | 768 * Stream controller for [onAnalysisInvalidate]. |
769 */ | 769 */ |
770 StreamController<AnalysisInvalidateParams> _onAnalysisInvalidate; | 770 StreamController<AnalysisInvalidateParams> _onAnalysisInvalidate; |
771 | 771 |
772 /** | 772 /** |
773 * Reports the navigation targets associated with a given file. | 773 * Reports the navigation targets associated with a given file. |
774 * | 774 * |
775 * This notification is not subscribed to by default. Clients can subscribe | 775 * This notification is not subscribed to by default. Clients can subscribe |
776 * by including the value "NAVIGATION" in the list of services passed in an | 776 * by including the value "NAVIGATION" in the list of services passed in an |
777 * analysis.setSubscriptions request. | 777 * analysis.setSubscriptions request. |
778 * | 778 * |
779 * Parameters | 779 * Parameters |
780 * | 780 * |
781 * file ( FilePath ) | 781 * file (FilePath) |
782 * | 782 * |
783 * The file containing the navigation regions. | 783 * The file containing the navigation regions. |
784 * | 784 * |
785 * regions ( List<NavigationRegion> ) | 785 * regions (List<NavigationRegion>) |
786 * | 786 * |
787 * The navigation regions contained in the file. The regions are sorted by | 787 * The navigation regions contained in the file. The regions are sorted by |
788 * their offsets. Each navigation region represents a list of targets | 788 * their offsets. Each navigation region represents a list of targets |
789 * associated with some range. The lists will usually contain a single | 789 * associated with some range. The lists will usually contain a single |
790 * target, but can contain more in the case of a part that is included in | 790 * target, but can contain more in the case of a part that is included in |
791 * multiple libraries or in Dart code that is compiled against multiple | 791 * multiple libraries or in Dart code that is compiled against multiple |
792 * versions of a package. Note that the navigation regions that are | 792 * versions of a package. Note that the navigation regions that are |
793 * returned do not overlap other navigation regions. | 793 * returned do not overlap other navigation regions. |
794 * | 794 * |
795 * targets ( List<NavigationTarget> ) | 795 * targets (List<NavigationTarget>) |
796 * | 796 * |
797 * The navigation targets referenced in the file. They are referenced by | 797 * The navigation targets referenced in the file. They are referenced by |
798 * NavigationRegions by their index in this array. | 798 * NavigationRegions by their index in this array. |
799 * | 799 * |
800 * files ( List<FilePath> ) | 800 * files (List<FilePath>) |
801 * | 801 * |
802 * The files containing navigation targets referenced in the file. They are | 802 * The files containing navigation targets referenced in the file. They are |
803 * referenced by NavigationTargets by their index in this array. | 803 * referenced by NavigationTargets by their index in this array. |
804 */ | 804 */ |
805 Stream<AnalysisNavigationParams> onAnalysisNavigation; | 805 Stream<AnalysisNavigationParams> onAnalysisNavigation; |
806 | 806 |
807 /** | 807 /** |
808 * Stream controller for [onAnalysisNavigation]. | 808 * Stream controller for [onAnalysisNavigation]. |
809 */ | 809 */ |
810 StreamController<AnalysisNavigationParams> _onAnalysisNavigation; | 810 StreamController<AnalysisNavigationParams> _onAnalysisNavigation; |
811 | 811 |
812 /** | 812 /** |
813 * Reports the occurrences of references to elements within a single file. | 813 * Reports the occurrences of references to elements within a single file. |
814 * | 814 * |
815 * This notification is not subscribed to by default. Clients can subscribe | 815 * This notification is not subscribed to by default. Clients can subscribe |
816 * by including the value "OCCURRENCES" in the list of services passed in an | 816 * by including the value "OCCURRENCES" in the list of services passed in an |
817 * analysis.setSubscriptions request. | 817 * analysis.setSubscriptions request. |
818 * | 818 * |
819 * Parameters | 819 * Parameters |
820 * | 820 * |
821 * file ( FilePath ) | 821 * file (FilePath) |
822 * | 822 * |
823 * The file in which the references occur. | 823 * The file in which the references occur. |
824 * | 824 * |
825 * occurrences ( List<Occurrences> ) | 825 * occurrences (List<Occurrences>) |
826 * | 826 * |
827 * The occurrences of references to elements within the file. | 827 * The occurrences of references to elements within the file. |
828 */ | 828 */ |
829 Stream<AnalysisOccurrencesParams> onAnalysisOccurrences; | 829 Stream<AnalysisOccurrencesParams> onAnalysisOccurrences; |
830 | 830 |
831 /** | 831 /** |
832 * Stream controller for [onAnalysisOccurrences]. | 832 * Stream controller for [onAnalysisOccurrences]. |
833 */ | 833 */ |
834 StreamController<AnalysisOccurrencesParams> _onAnalysisOccurrences; | 834 StreamController<AnalysisOccurrencesParams> _onAnalysisOccurrences; |
835 | 835 |
836 /** | 836 /** |
837 * Reports the outline associated with a single file. | 837 * Reports the outline associated with a single file. |
838 * | 838 * |
839 * This notification is not subscribed to by default. Clients can subscribe | 839 * This notification is not subscribed to by default. Clients can subscribe |
840 * by including the value "OUTLINE" in the list of services passed in an | 840 * by including the value "OUTLINE" in the list of services passed in an |
841 * analysis.setSubscriptions request. | 841 * analysis.setSubscriptions request. |
842 * | 842 * |
843 * Parameters | 843 * Parameters |
844 * | 844 * |
845 * file ( FilePath ) | 845 * file (FilePath) |
846 * | 846 * |
847 * The file with which the outline is associated. | 847 * The file with which the outline is associated. |
848 * | 848 * |
849 * kind ( FileKind ) | 849 * kind (FileKind) |
850 * | 850 * |
851 * The kind of the file. | 851 * The kind of the file. |
852 * | 852 * |
853 * libraryName ( optional String ) | 853 * libraryName (optional String) |
854 * | 854 * |
855 * The name of the library defined by the file using a "library" directive, | 855 * The name of the library defined by the file using a "library" directive, |
856 * or referenced by a "part of" directive. If both "library" and "part of" | 856 * or referenced by a "part of" directive. If both "library" and "part of" |
857 * directives are present, then the "library" directive takes precedence. | 857 * directives are present, then the "library" directive takes precedence. |
858 * This field will be omitted if the file has neither "library" nor "part | 858 * This field will be omitted if the file has neither "library" nor "part |
859 * of" directives. | 859 * of" directives. |
860 * | 860 * |
861 * outline ( Outline ) | 861 * outline (Outline) |
862 * | 862 * |
863 * The outline associated with the file. | 863 * The outline associated with the file. |
864 */ | 864 */ |
865 Stream<AnalysisOutlineParams> onAnalysisOutline; | 865 Stream<AnalysisOutlineParams> onAnalysisOutline; |
866 | 866 |
867 /** | 867 /** |
868 * Stream controller for [onAnalysisOutline]. | 868 * Stream controller for [onAnalysisOutline]. |
869 */ | 869 */ |
870 StreamController<AnalysisOutlineParams> _onAnalysisOutline; | 870 StreamController<AnalysisOutlineParams> _onAnalysisOutline; |
871 | 871 |
872 /** | 872 /** |
873 * Reports the overriding members in a file. | 873 * Reports the overriding members in a file. |
874 * | 874 * |
875 * This notification is not subscribed to by default. Clients can subscribe | 875 * This notification is not subscribed to by default. Clients can subscribe |
876 * by including the value "OVERRIDES" in the list of services passed in an | 876 * by including the value "OVERRIDES" in the list of services passed in an |
877 * analysis.setSubscriptions request. | 877 * analysis.setSubscriptions request. |
878 * | 878 * |
879 * Parameters | 879 * Parameters |
880 * | 880 * |
881 * file ( FilePath ) | 881 * file (FilePath) |
882 * | 882 * |
883 * The file with which the overrides are associated. | 883 * The file with which the overrides are associated. |
884 * | 884 * |
885 * overrides ( List<Override> ) | 885 * overrides (List<Override>) |
886 * | 886 * |
887 * The overrides associated with the file. | 887 * The overrides associated with the file. |
888 */ | 888 */ |
889 Stream<AnalysisOverridesParams> onAnalysisOverrides; | 889 Stream<AnalysisOverridesParams> onAnalysisOverrides; |
890 | 890 |
891 /** | 891 /** |
892 * Stream controller for [onAnalysisOverrides]. | 892 * Stream controller for [onAnalysisOverrides]. |
893 */ | 893 */ |
894 StreamController<AnalysisOverridesParams> _onAnalysisOverrides; | 894 StreamController<AnalysisOverridesParams> _onAnalysisOverrides; |
895 | 895 |
896 /** | 896 /** |
897 * Request that completion suggestions for the given offset in the given file | 897 * Request that completion suggestions for the given offset in the given file |
898 * be returned. | 898 * be returned. |
899 * | 899 * |
900 * Parameters | 900 * Parameters |
901 * | 901 * |
902 * file ( FilePath ) | 902 * file (FilePath) |
903 * | 903 * |
904 * The file containing the point at which suggestions are to be made. | 904 * The file containing the point at which suggestions are to be made. |
905 * | 905 * |
906 * offset ( int ) | 906 * offset (int) |
907 * | 907 * |
908 * The offset within the file at which suggestions are to be made. | 908 * The offset within the file at which suggestions are to be made. |
909 * | 909 * |
910 * Returns | 910 * Returns |
911 * | 911 * |
912 * id ( CompletionId ) | 912 * id (CompletionId) |
913 * | 913 * |
914 * The identifier used to associate results with this completion request. | 914 * The identifier used to associate results with this completion request. |
915 */ | 915 */ |
916 Future<CompletionGetSuggestionsResult> sendCompletionGetSuggestions(String fil
e, int offset) async { | 916 Future<CompletionGetSuggestionsResult> sendCompletionGetSuggestions(String fil
e, int offset) async { |
917 var params = new CompletionGetSuggestionsParams(file, offset).toJson(); | 917 var params = new CompletionGetSuggestionsParams(file, offset).toJson(); |
918 var result = await server.send("completion.getSuggestions", params); | 918 var result = await server.send("completion.getSuggestions", params); |
919 ResponseDecoder decoder = new ResponseDecoder(null); | 919 ResponseDecoder decoder = new ResponseDecoder(null); |
920 return new CompletionGetSuggestionsResult.fromJson(decoder, 'result', result
); | 920 return new CompletionGetSuggestionsResult.fromJson(decoder, 'result', result
); |
921 } | 921 } |
922 | 922 |
923 /** | 923 /** |
924 * Reports the completion suggestions that should be presented to the user. | 924 * Reports the completion suggestions that should be presented to the user. |
925 * The set of suggestions included in the notification is always a complete | 925 * The set of suggestions included in the notification is always a complete |
926 * list that supersedes any previously reported suggestions. | 926 * list that supersedes any previously reported suggestions. |
927 * | 927 * |
928 * Parameters | 928 * Parameters |
929 * | 929 * |
930 * id ( CompletionId ) | 930 * id (CompletionId) |
931 * | 931 * |
932 * The id associated with the completion. | 932 * The id associated with the completion. |
933 * | 933 * |
934 * replacementOffset ( int ) | 934 * replacementOffset (int) |
935 * | 935 * |
936 * The offset of the start of the text to be replaced. This will be | 936 * The offset of the start of the text to be replaced. This will be |
937 * different than the offset used to request the completion suggestions if | 937 * different than the offset used to request the completion suggestions if |
938 * there was a portion of an identifier before the original offset. In | 938 * there was a portion of an identifier before the original offset. In |
939 * particular, the replacementOffset will be the offset of the beginning of | 939 * particular, the replacementOffset will be the offset of the beginning of |
940 * said identifier. | 940 * said identifier. |
941 * | 941 * |
942 * replacementLength ( int ) | 942 * replacementLength (int) |
943 * | 943 * |
944 * The length of the text to be replaced if the remainder of the identifier | 944 * The length of the text to be replaced if the remainder of the identifier |
945 * containing the cursor is to be replaced when the suggestion is applied | 945 * containing the cursor is to be replaced when the suggestion is applied |
946 * (that is, the number of characters in the existing identifier). | 946 * (that is, the number of characters in the existing identifier). |
947 * | 947 * |
948 * results ( List<CompletionSuggestion> ) | 948 * results (List<CompletionSuggestion>) |
949 * | 949 * |
950 * The completion suggestions being reported. The notification contains all | 950 * The completion suggestions being reported. The notification contains all |
951 * possible completions at the requested cursor position, even those that | 951 * possible completions at the requested cursor position, even those that |
952 * do not match the characters the user has already typed. This allows the | 952 * do not match the characters the user has already typed. This allows the |
953 * client to respond to further keystrokes from the user without having to | 953 * client to respond to further keystrokes from the user without having to |
954 * make additional requests. | 954 * make additional requests. |
955 * | 955 * |
956 * isLast ( bool ) | 956 * isLast (bool) |
957 * | 957 * |
958 * True if this is that last set of results that will be returned for the | 958 * True if this is that last set of results that will be returned for the |
959 * indicated completion. | 959 * indicated completion. |
960 */ | 960 */ |
961 Stream<CompletionResultsParams> onCompletionResults; | 961 Stream<CompletionResultsParams> onCompletionResults; |
962 | 962 |
963 /** | 963 /** |
964 * Stream controller for [onCompletionResults]. | 964 * Stream controller for [onCompletionResults]. |
965 */ | 965 */ |
966 StreamController<CompletionResultsParams> _onCompletionResults; | 966 StreamController<CompletionResultsParams> _onCompletionResults; |
967 | 967 |
968 /** | 968 /** |
969 * Perform a search for references to the element defined or referenced at | 969 * Perform a search for references to the element defined or referenced at |
970 * the given offset in the given file. | 970 * the given offset in the given file. |
971 * | 971 * |
972 * An identifier is returned immediately, and individual results will be | 972 * An identifier is returned immediately, and individual results will be |
973 * returned via the search.results notification as they become available. | 973 * returned via the search.results notification as they become available. |
974 * | 974 * |
975 * Parameters | 975 * Parameters |
976 * | 976 * |
977 * file ( FilePath ) | 977 * file (FilePath) |
978 * | 978 * |
979 * The file containing the declaration of or reference to the element used | 979 * The file containing the declaration of or reference to the element used |
980 * to define the search. | 980 * to define the search. |
981 * | 981 * |
982 * offset ( int ) | 982 * offset (int) |
983 * | 983 * |
984 * The offset within the file of the declaration of or reference to the | 984 * The offset within the file of the declaration of or reference to the |
985 * element. | 985 * element. |
986 * | 986 * |
987 * includePotential ( bool ) | 987 * includePotential (bool) |
988 * | 988 * |
989 * True if potential matches are to be included in the results. | 989 * True if potential matches are to be included in the results. |
990 * | 990 * |
991 * Returns | 991 * Returns |
992 * | 992 * |
993 * id ( optional SearchId ) | 993 * id (optional SearchId) |
994 * | 994 * |
995 * The identifier used to associate results with this search request. | 995 * The identifier used to associate results with this search request. |
996 * | 996 * |
997 * If no element was found at the given location, this field will be | 997 * If no element was found at the given location, this field will be |
998 * absent, and no results will be reported via the search.results | 998 * absent, and no results will be reported via the search.results |
999 * notification. | 999 * notification. |
1000 * | 1000 * |
1001 * element ( optional Element ) | 1001 * element (optional Element) |
1002 * | 1002 * |
1003 * The element referenced or defined at the given offset and whose | 1003 * The element referenced or defined at the given offset and whose |
1004 * references will be returned in the search results. | 1004 * references will be returned in the search results. |
1005 * | 1005 * |
1006 * If no element was found at the given location, this field will be | 1006 * If no element was found at the given location, this field will be |
1007 * absent. | 1007 * absent. |
1008 */ | 1008 */ |
1009 Future<SearchFindElementReferencesResult> sendSearchFindElementReferences(Stri
ng file, int offset, bool includePotential) async { | 1009 Future<SearchFindElementReferencesResult> sendSearchFindElementReferences(Stri
ng file, int offset, bool includePotential) async { |
1010 var params = new SearchFindElementReferencesParams(file, offset, includePote
ntial).toJson(); | 1010 var params = new SearchFindElementReferencesParams(file, offset, includePote
ntial).toJson(); |
1011 var result = await server.send("search.findElementReferences", params); | 1011 var result = await server.send("search.findElementReferences", params); |
1012 ResponseDecoder decoder = new ResponseDecoder(null); | 1012 ResponseDecoder decoder = new ResponseDecoder(null); |
1013 return new SearchFindElementReferencesResult.fromJson(decoder, 'result', res
ult); | 1013 return new SearchFindElementReferencesResult.fromJson(decoder, 'result', res
ult); |
1014 } | 1014 } |
1015 | 1015 |
1016 /** | 1016 /** |
1017 * Perform a search for declarations of members whose name is equal to the | 1017 * Perform a search for declarations of members whose name is equal to the |
1018 * given name. | 1018 * given name. |
1019 * | 1019 * |
1020 * An identifier is returned immediately, and individual results will be | 1020 * An identifier is returned immediately, and individual results will be |
1021 * returned via the search.results notification as they become available. | 1021 * returned via the search.results notification as they become available. |
1022 * | 1022 * |
1023 * Parameters | 1023 * Parameters |
1024 * | 1024 * |
1025 * name ( String ) | 1025 * name (String) |
1026 * | 1026 * |
1027 * The name of the declarations to be found. | 1027 * The name of the declarations to be found. |
1028 * | 1028 * |
1029 * Returns | 1029 * Returns |
1030 * | 1030 * |
1031 * id ( SearchId ) | 1031 * id (SearchId) |
1032 * | 1032 * |
1033 * The identifier used to associate results with this search request. | 1033 * The identifier used to associate results with this search request. |
1034 */ | 1034 */ |
1035 Future<SearchFindMemberDeclarationsResult> sendSearchFindMemberDeclarations(St
ring name) async { | 1035 Future<SearchFindMemberDeclarationsResult> sendSearchFindMemberDeclarations(St
ring name) async { |
1036 var params = new SearchFindMemberDeclarationsParams(name).toJson(); | 1036 var params = new SearchFindMemberDeclarationsParams(name).toJson(); |
1037 var result = await server.send("search.findMemberDeclarations", params); | 1037 var result = await server.send("search.findMemberDeclarations", params); |
1038 ResponseDecoder decoder = new ResponseDecoder(null); | 1038 ResponseDecoder decoder = new ResponseDecoder(null); |
1039 return new SearchFindMemberDeclarationsResult.fromJson(decoder, 'result', re
sult); | 1039 return new SearchFindMemberDeclarationsResult.fromJson(decoder, 'result', re
sult); |
1040 } | 1040 } |
1041 | 1041 |
1042 /** | 1042 /** |
1043 * Perform a search for references to members whose name is equal to the | 1043 * Perform a search for references to members whose name is equal to the |
1044 * given name. This search does not check to see that there is a member | 1044 * given name. This search does not check to see that there is a member |
1045 * defined with the given name, so it is able to find references to undefined | 1045 * defined with the given name, so it is able to find references to undefined |
1046 * members as well. | 1046 * members as well. |
1047 * | 1047 * |
1048 * An identifier is returned immediately, and individual results will be | 1048 * An identifier is returned immediately, and individual results will be |
1049 * returned via the search.results notification as they become available. | 1049 * returned via the search.results notification as they become available. |
1050 * | 1050 * |
1051 * Parameters | 1051 * Parameters |
1052 * | 1052 * |
1053 * name ( String ) | 1053 * name (String) |
1054 * | 1054 * |
1055 * The name of the references to be found. | 1055 * The name of the references to be found. |
1056 * | 1056 * |
1057 * Returns | 1057 * Returns |
1058 * | 1058 * |
1059 * id ( SearchId ) | 1059 * id (SearchId) |
1060 * | 1060 * |
1061 * The identifier used to associate results with this search request. | 1061 * The identifier used to associate results with this search request. |
1062 */ | 1062 */ |
1063 Future<SearchFindMemberReferencesResult> sendSearchFindMemberReferences(String
name) async { | 1063 Future<SearchFindMemberReferencesResult> sendSearchFindMemberReferences(String
name) async { |
1064 var params = new SearchFindMemberReferencesParams(name).toJson(); | 1064 var params = new SearchFindMemberReferencesParams(name).toJson(); |
1065 var result = await server.send("search.findMemberReferences", params); | 1065 var result = await server.send("search.findMemberReferences", params); |
1066 ResponseDecoder decoder = new ResponseDecoder(null); | 1066 ResponseDecoder decoder = new ResponseDecoder(null); |
1067 return new SearchFindMemberReferencesResult.fromJson(decoder, 'result', resu
lt); | 1067 return new SearchFindMemberReferencesResult.fromJson(decoder, 'result', resu
lt); |
1068 } | 1068 } |
1069 | 1069 |
1070 /** | 1070 /** |
1071 * Perform a search for declarations of top-level elements (classes, | 1071 * Perform a search for declarations of top-level elements (classes, |
1072 * typedefs, getters, setters, functions and fields) whose name matches the | 1072 * typedefs, getters, setters, functions and fields) whose name matches the |
1073 * given pattern. | 1073 * given pattern. |
1074 * | 1074 * |
1075 * An identifier is returned immediately, and individual results will be | 1075 * An identifier is returned immediately, and individual results will be |
1076 * returned via the search.results notification as they become available. | 1076 * returned via the search.results notification as they become available. |
1077 * | 1077 * |
1078 * Parameters | 1078 * Parameters |
1079 * | 1079 * |
1080 * pattern ( String ) | 1080 * pattern (String) |
1081 * | 1081 * |
1082 * The regular expression used to match the names of the declarations to be | 1082 * The regular expression used to match the names of the declarations to be |
1083 * found. | 1083 * found. |
1084 * | 1084 * |
1085 * Returns | 1085 * Returns |
1086 * | 1086 * |
1087 * id ( SearchId ) | 1087 * id (SearchId) |
1088 * | 1088 * |
1089 * The identifier used to associate results with this search request. | 1089 * The identifier used to associate results with this search request. |
1090 */ | 1090 */ |
1091 Future<SearchFindTopLevelDeclarationsResult> sendSearchFindTopLevelDeclaration
s(String pattern) async { | 1091 Future<SearchFindTopLevelDeclarationsResult> sendSearchFindTopLevelDeclaration
s(String pattern) async { |
1092 var params = new SearchFindTopLevelDeclarationsParams(pattern).toJson(); | 1092 var params = new SearchFindTopLevelDeclarationsParams(pattern).toJson(); |
1093 var result = await server.send("search.findTopLevelDeclarations", params); | 1093 var result = await server.send("search.findTopLevelDeclarations", params); |
1094 ResponseDecoder decoder = new ResponseDecoder(null); | 1094 ResponseDecoder decoder = new ResponseDecoder(null); |
1095 return new SearchFindTopLevelDeclarationsResult.fromJson(decoder, 'result',
result); | 1095 return new SearchFindTopLevelDeclarationsResult.fromJson(decoder, 'result',
result); |
1096 } | 1096 } |
1097 | 1097 |
1098 /** | 1098 /** |
1099 * Return the type hierarchy of the class declared or referenced at the given | 1099 * Return the type hierarchy of the class declared or referenced at the given |
1100 * location. | 1100 * location. |
1101 * | 1101 * |
1102 * Parameters | 1102 * Parameters |
1103 * | 1103 * |
1104 * file ( FilePath ) | 1104 * file (FilePath) |
1105 * | 1105 * |
1106 * The file containing the declaration or reference to the type for which a | 1106 * The file containing the declaration or reference to the type for which a |
1107 * hierarchy is being requested. | 1107 * hierarchy is being requested. |
1108 * | 1108 * |
1109 * offset ( int ) | 1109 * offset (int) |
1110 * | 1110 * |
1111 * The offset of the name of the type within the file. | 1111 * The offset of the name of the type within the file. |
1112 * | 1112 * |
1113 * superOnly ( optional bool ) | 1113 * superOnly (optional bool) |
1114 * | 1114 * |
1115 * True if the client is only requesting superclasses and interfaces | 1115 * True if the client is only requesting superclasses and interfaces |
1116 * hierarchy. | 1116 * hierarchy. |
1117 * | 1117 * |
1118 * Returns | 1118 * Returns |
1119 * | 1119 * |
1120 * hierarchyItems ( optional List<TypeHierarchyItem> ) | 1120 * hierarchyItems (optional List<TypeHierarchyItem>) |
1121 * | 1121 * |
1122 * A list of the types in the requested hierarchy. The first element of the | 1122 * A list of the types in the requested hierarchy. The first element of the |
1123 * list is the item representing the type for which the hierarchy was | 1123 * list is the item representing the type for which the hierarchy was |
1124 * requested. The index of other elements of the list is unspecified, but | 1124 * requested. The index of other elements of the list is unspecified, but |
1125 * correspond to the integers used to reference supertype and subtype items | 1125 * correspond to the integers used to reference supertype and subtype items |
1126 * within the items. | 1126 * within the items. |
1127 * | 1127 * |
1128 * This field will be absent if the code at the given file and offset does | 1128 * This field will be absent if the code at the given file and offset does |
1129 * not represent a type, or if the file has not been sufficiently analyzed | 1129 * not represent a type, or if the file has not been sufficiently analyzed |
1130 * to allow a type hierarchy to be produced. | 1130 * to allow a type hierarchy to be produced. |
1131 */ | 1131 */ |
1132 Future<SearchGetTypeHierarchyResult> sendSearchGetTypeHierarchy(String file, i
nt offset, {bool superOnly}) async { | 1132 Future<SearchGetTypeHierarchyResult> sendSearchGetTypeHierarchy(String file, i
nt offset, {bool superOnly}) async { |
1133 var params = new SearchGetTypeHierarchyParams(file, offset, superOnly: super
Only).toJson(); | 1133 var params = new SearchGetTypeHierarchyParams(file, offset, superOnly: super
Only).toJson(); |
1134 var result = await server.send("search.getTypeHierarchy", params); | 1134 var result = await server.send("search.getTypeHierarchy", params); |
1135 ResponseDecoder decoder = new ResponseDecoder(null); | 1135 ResponseDecoder decoder = new ResponseDecoder(null); |
1136 return new SearchGetTypeHierarchyResult.fromJson(decoder, 'result', result); | 1136 return new SearchGetTypeHierarchyResult.fromJson(decoder, 'result', result); |
1137 } | 1137 } |
1138 | 1138 |
1139 /** | 1139 /** |
1140 * Reports some or all of the results of performing a requested search. | 1140 * Reports some or all of the results of performing a requested search. |
1141 * Unlike other notifications, this notification contains search results that | 1141 * Unlike other notifications, this notification contains search results that |
1142 * should be added to any previously received search results associated with | 1142 * should be added to any previously received search results associated with |
1143 * the same search id. | 1143 * the same search id. |
1144 * | 1144 * |
1145 * Parameters | 1145 * Parameters |
1146 * | 1146 * |
1147 * id ( SearchId ) | 1147 * id (SearchId) |
1148 * | 1148 * |
1149 * The id associated with the search. | 1149 * The id associated with the search. |
1150 * | 1150 * |
1151 * results ( List<SearchResult> ) | 1151 * results (List<SearchResult>) |
1152 * | 1152 * |
1153 * The search results being reported. | 1153 * The search results being reported. |
1154 * | 1154 * |
1155 * isLast ( bool ) | 1155 * isLast (bool) |
1156 * | 1156 * |
1157 * True if this is that last set of results that will be returned for the | 1157 * True if this is that last set of results that will be returned for the |
1158 * indicated search. | 1158 * indicated search. |
1159 */ | 1159 */ |
1160 Stream<SearchResultsParams> onSearchResults; | 1160 Stream<SearchResultsParams> onSearchResults; |
1161 | 1161 |
1162 /** | 1162 /** |
1163 * Stream controller for [onSearchResults]. | 1163 * Stream controller for [onSearchResults]. |
1164 */ | 1164 */ |
1165 StreamController<SearchResultsParams> _onSearchResults; | 1165 StreamController<SearchResultsParams> _onSearchResults; |
1166 | 1166 |
1167 /** | 1167 /** |
1168 * Format the contents of a single file. The currently selected region of | 1168 * Format the contents of a single file. The currently selected region of |
1169 * text is passed in so that the selection can be preserved across the | 1169 * text is passed in so that the selection can be preserved across the |
1170 * formatting operation. The updated selection will be as close to matching | 1170 * formatting operation. The updated selection will be as close to matching |
1171 * the original as possible, but whitespace at the beginning or end of the | 1171 * the original as possible, but whitespace at the beginning or end of the |
1172 * selected region will be ignored. If preserving selection information is | 1172 * selected region will be ignored. If preserving selection information is |
1173 * not required, zero (0) can be specified for both the selection offset and | 1173 * not required, zero (0) can be specified for both the selection offset and |
1174 * selection length. | 1174 * selection length. |
1175 * | 1175 * |
1176 * If a request is made for a file which does not exist, or which is not | 1176 * If a request is made for a file which does not exist, or which is not |
1177 * currently subject to analysis (e.g. because it is not associated with any | 1177 * currently subject to analysis (e.g. because it is not associated with any |
1178 * analysis root specified to analysis.setAnalysisRoots), an error of type | 1178 * analysis root specified to analysis.setAnalysisRoots), an error of type |
1179 * FORMAT_INVALID_FILE will be generated. If the source contains syntax | 1179 * FORMAT_INVALID_FILE will be generated. If the source contains syntax |
1180 * errors, an error of type FORMAT_WITH_ERRORS will be generated. | 1180 * errors, an error of type FORMAT_WITH_ERRORS will be generated. |
1181 * | 1181 * |
1182 * Parameters | 1182 * Parameters |
1183 * | 1183 * |
1184 * file ( FilePath ) | 1184 * file (FilePath) |
1185 * | 1185 * |
1186 * The file containing the code to be formatted. | 1186 * The file containing the code to be formatted. |
1187 * | 1187 * |
1188 * selectionOffset ( int ) | 1188 * selectionOffset (int) |
1189 * | 1189 * |
1190 * The offset of the current selection in the file. | 1190 * The offset of the current selection in the file. |
1191 * | 1191 * |
1192 * selectionLength ( int ) | 1192 * selectionLength (int) |
1193 * | 1193 * |
1194 * The length of the current selection in the file. | 1194 * The length of the current selection in the file. |
1195 * | 1195 * |
1196 * lineLength ( optional int ) | 1196 * lineLength (optional int) |
1197 * | 1197 * |
1198 * The line length to be used by the formatter. | 1198 * The line length to be used by the formatter. |
1199 * | 1199 * |
1200 * Returns | 1200 * Returns |
1201 * | 1201 * |
1202 * edits ( List<SourceEdit> ) | 1202 * edits (List<SourceEdit>) |
1203 * | 1203 * |
1204 * The edit(s) to be applied in order to format the code. The list will be | 1204 * The edit(s) to be applied in order to format the code. The list will be |
1205 * empty if the code was already formatted (there are no changes). | 1205 * empty if the code was already formatted (there are no changes). |
1206 * | 1206 * |
1207 * selectionOffset ( int ) | 1207 * selectionOffset (int) |
1208 * | 1208 * |
1209 * The offset of the selection after formatting the code. | 1209 * The offset of the selection after formatting the code. |
1210 * | 1210 * |
1211 * selectionLength ( int ) | 1211 * selectionLength (int) |
1212 * | 1212 * |
1213 * The length of the selection after formatting the code. | 1213 * The length of the selection after formatting the code. |
1214 */ | 1214 */ |
1215 Future<EditFormatResult> sendEditFormat(String file, int selectionOffset, int
selectionLength, {int lineLength}) async { | 1215 Future<EditFormatResult> sendEditFormat(String file, int selectionOffset, int
selectionLength, {int lineLength}) async { |
1216 var params = new EditFormatParams(file, selectionOffset, selectionLength, li
neLength: lineLength).toJson(); | 1216 var params = new EditFormatParams(file, selectionOffset, selectionLength, li
neLength: lineLength).toJson(); |
1217 var result = await server.send("edit.format", params); | 1217 var result = await server.send("edit.format", params); |
1218 ResponseDecoder decoder = new ResponseDecoder(null); | 1218 ResponseDecoder decoder = new ResponseDecoder(null); |
1219 return new EditFormatResult.fromJson(decoder, 'result', result); | 1219 return new EditFormatResult.fromJson(decoder, 'result', result); |
1220 } | 1220 } |
1221 | 1221 |
1222 /** | 1222 /** |
1223 * Return the set of assists that are available at the given location. An | 1223 * Return the set of assists that are available at the given location. An |
1224 * assist is distinguished from a refactoring primarily by the fact that it | 1224 * assist is distinguished from a refactoring primarily by the fact that it |
1225 * affects a single file and does not require user input in order to be | 1225 * affects a single file and does not require user input in order to be |
1226 * performed. | 1226 * performed. |
1227 * | 1227 * |
1228 * Parameters | 1228 * Parameters |
1229 * | 1229 * |
1230 * file ( FilePath ) | 1230 * file (FilePath) |
1231 * | 1231 * |
1232 * The file containing the code for which assists are being requested. | 1232 * The file containing the code for which assists are being requested. |
1233 * | 1233 * |
1234 * offset ( int ) | 1234 * offset (int) |
1235 * | 1235 * |
1236 * The offset of the code for which assists are being requested. | 1236 * The offset of the code for which assists are being requested. |
1237 * | 1237 * |
1238 * length ( int ) | 1238 * length (int) |
1239 * | 1239 * |
1240 * The length of the code for which assists are being requested. | 1240 * The length of the code for which assists are being requested. |
1241 * | 1241 * |
1242 * Returns | 1242 * Returns |
1243 * | 1243 * |
1244 * assists ( List<SourceChange> ) | 1244 * assists (List<SourceChange>) |
1245 * | 1245 * |
1246 * The assists that are available at the given location. | 1246 * The assists that are available at the given location. |
1247 */ | 1247 */ |
1248 Future<EditGetAssistsResult> sendEditGetAssists(String file, int offset, int l
ength) async { | 1248 Future<EditGetAssistsResult> sendEditGetAssists(String file, int offset, int l
ength) async { |
1249 var params = new EditGetAssistsParams(file, offset, length).toJson(); | 1249 var params = new EditGetAssistsParams(file, offset, length).toJson(); |
1250 var result = await server.send("edit.getAssists", params); | 1250 var result = await server.send("edit.getAssists", params); |
1251 ResponseDecoder decoder = new ResponseDecoder(null); | 1251 ResponseDecoder decoder = new ResponseDecoder(null); |
1252 return new EditGetAssistsResult.fromJson(decoder, 'result', result); | 1252 return new EditGetAssistsResult.fromJson(decoder, 'result', result); |
1253 } | 1253 } |
1254 | 1254 |
1255 /** | 1255 /** |
1256 * Get a list of the kinds of refactorings that are valid for the given | 1256 * Get a list of the kinds of refactorings that are valid for the given |
1257 * selection in the given file. | 1257 * selection in the given file. |
1258 * | 1258 * |
1259 * Parameters | 1259 * Parameters |
1260 * | 1260 * |
1261 * file ( FilePath ) | 1261 * file (FilePath) |
1262 * | 1262 * |
1263 * The file containing the code on which the refactoring would be based. | 1263 * The file containing the code on which the refactoring would be based. |
1264 * | 1264 * |
1265 * offset ( int ) | 1265 * offset (int) |
1266 * | 1266 * |
1267 * The offset of the code on which the refactoring would be based. | 1267 * The offset of the code on which the refactoring would be based. |
1268 * | 1268 * |
1269 * length ( int ) | 1269 * length (int) |
1270 * | 1270 * |
1271 * The length of the code on which the refactoring would be based. | 1271 * The length of the code on which the refactoring would be based. |
1272 * | 1272 * |
1273 * Returns | 1273 * Returns |
1274 * | 1274 * |
1275 * kinds ( List<RefactoringKind> ) | 1275 * kinds (List<RefactoringKind>) |
1276 * | 1276 * |
1277 * The kinds of refactorings that are valid for the given selection. | 1277 * The kinds of refactorings that are valid for the given selection. |
1278 */ | 1278 */ |
1279 Future<EditGetAvailableRefactoringsResult> sendEditGetAvailableRefactorings(St
ring file, int offset, int length) async { | 1279 Future<EditGetAvailableRefactoringsResult> sendEditGetAvailableRefactorings(St
ring file, int offset, int length) async { |
1280 var params = new EditGetAvailableRefactoringsParams(file, offset, length).to
Json(); | 1280 var params = new EditGetAvailableRefactoringsParams(file, offset, length).to
Json(); |
1281 var result = await server.send("edit.getAvailableRefactorings", params); | 1281 var result = await server.send("edit.getAvailableRefactorings", params); |
1282 ResponseDecoder decoder = new ResponseDecoder(null); | 1282 ResponseDecoder decoder = new ResponseDecoder(null); |
1283 return new EditGetAvailableRefactoringsResult.fromJson(decoder, 'result', re
sult); | 1283 return new EditGetAvailableRefactoringsResult.fromJson(decoder, 'result', re
sult); |
1284 } | 1284 } |
1285 | 1285 |
1286 /** | 1286 /** |
1287 * Return the set of fixes that are available for the errors at a given | 1287 * Return the set of fixes that are available for the errors at a given |
1288 * offset in a given file. | 1288 * offset in a given file. |
1289 * | 1289 * |
1290 * Parameters | 1290 * Parameters |
1291 * | 1291 * |
1292 * file ( FilePath ) | 1292 * file (FilePath) |
1293 * | 1293 * |
1294 * The file containing the errors for which fixes are being requested. | 1294 * The file containing the errors for which fixes are being requested. |
1295 * | 1295 * |
1296 * offset ( int ) | 1296 * offset (int) |
1297 * | 1297 * |
1298 * The offset used to select the errors for which fixes will be returned. | 1298 * The offset used to select the errors for which fixes will be returned. |
1299 * | 1299 * |
1300 * Returns | 1300 * Returns |
1301 * | 1301 * |
1302 * fixes ( List<AnalysisErrorFixes> ) | 1302 * fixes (List<AnalysisErrorFixes>) |
1303 * | 1303 * |
1304 * The fixes that are available for the errors at the given offset. | 1304 * The fixes that are available for the errors at the given offset. |
1305 */ | 1305 */ |
1306 Future<EditGetFixesResult> sendEditGetFixes(String file, int offset) async { | 1306 Future<EditGetFixesResult> sendEditGetFixes(String file, int offset) async { |
1307 var params = new EditGetFixesParams(file, offset).toJson(); | 1307 var params = new EditGetFixesParams(file, offset).toJson(); |
1308 var result = await server.send("edit.getFixes", params); | 1308 var result = await server.send("edit.getFixes", params); |
1309 ResponseDecoder decoder = new ResponseDecoder(null); | 1309 ResponseDecoder decoder = new ResponseDecoder(null); |
1310 return new EditGetFixesResult.fromJson(decoder, 'result', result); | 1310 return new EditGetFixesResult.fromJson(decoder, 'result', result); |
1311 } | 1311 } |
1312 | 1312 |
1313 /** | 1313 /** |
1314 * Get the changes required to perform a refactoring. | 1314 * Get the changes required to perform a refactoring. |
1315 * | 1315 * |
1316 * If another refactoring request is received during the processing of this | 1316 * If another refactoring request is received during the processing of this |
1317 * one, an error of type REFACTORING_REQUEST_CANCELLED will be generated. | 1317 * one, an error of type REFACTORING_REQUEST_CANCELLED will be generated. |
1318 * | 1318 * |
1319 * Parameters | 1319 * Parameters |
1320 * | 1320 * |
1321 * kind ( RefactoringKind ) | 1321 * kind (RefactoringKind) |
1322 * | 1322 * |
1323 * The kind of refactoring to be performed. | 1323 * The kind of refactoring to be performed. |
1324 * | 1324 * |
1325 * file ( FilePath ) | 1325 * file (FilePath) |
1326 * | 1326 * |
1327 * The file containing the code involved in the refactoring. | 1327 * The file containing the code involved in the refactoring. |
1328 * | 1328 * |
1329 * offset ( int ) | 1329 * offset (int) |
1330 * | 1330 * |
1331 * The offset of the region involved in the refactoring. | 1331 * The offset of the region involved in the refactoring. |
1332 * | 1332 * |
1333 * length ( int ) | 1333 * length (int) |
1334 * | 1334 * |
1335 * The length of the region involved in the refactoring. | 1335 * The length of the region involved in the refactoring. |
1336 * | 1336 * |
1337 * validateOnly ( bool ) | 1337 * validateOnly (bool) |
1338 * | 1338 * |
1339 * True if the client is only requesting that the values of the options be | 1339 * True if the client is only requesting that the values of the options be |
1340 * validated and no change be generated. | 1340 * validated and no change be generated. |
1341 * | 1341 * |
1342 * options ( optional RefactoringOptions ) | 1342 * options (optional RefactoringOptions) |
1343 * | 1343 * |
1344 * Data used to provide values provided by the user. The structure of the | 1344 * Data used to provide values provided by the user. The structure of the |
1345 * data is dependent on the kind of refactoring being performed. The data | 1345 * data is dependent on the kind of refactoring being performed. The data |
1346 * that is expected is documented in the section titled Refactorings, | 1346 * that is expected is documented in the section titled Refactorings, |
1347 * labeled as “Options”. This field can be omitted if the refactoring does | 1347 * labeled as “Options”. This field can be omitted if the refactoring does |
1348 * not require any options or if the values of those options are not known. | 1348 * not require any options or if the values of those options are not known. |
1349 * | 1349 * |
1350 * Returns | 1350 * Returns |
1351 * | 1351 * |
1352 * initialProblems ( List<RefactoringProblem> ) | 1352 * initialProblems (List<RefactoringProblem>) |
1353 * | 1353 * |
1354 * The initial status of the refactoring, i.e. problems related to the | 1354 * The initial status of the refactoring, i.e. problems related to the |
1355 * context in which the refactoring is requested. The array will be empty | 1355 * context in which the refactoring is requested. The array will be empty |
1356 * if there are no known problems. | 1356 * if there are no known problems. |
1357 * | 1357 * |
1358 * optionsProblems ( List<RefactoringProblem> ) | 1358 * optionsProblems (List<RefactoringProblem>) |
1359 * | 1359 * |
1360 * The options validation status, i.e. problems in the given options, such | 1360 * The options validation status, i.e. problems in the given options, such |
1361 * as light-weight validation of a new name, flags compatibility, etc. The | 1361 * as light-weight validation of a new name, flags compatibility, etc. The |
1362 * array will be empty if there are no known problems. | 1362 * array will be empty if there are no known problems. |
1363 * | 1363 * |
1364 * finalProblems ( List<RefactoringProblem> ) | 1364 * finalProblems (List<RefactoringProblem>) |
1365 * | 1365 * |
1366 * The final status of the refactoring, i.e. problems identified in the | 1366 * The final status of the refactoring, i.e. problems identified in the |
1367 * result of a full, potentially expensive validation and / or change | 1367 * result of a full, potentially expensive validation and / or change |
1368 * creation. The array will be empty if there are no known problems. | 1368 * creation. The array will be empty if there are no known problems. |
1369 * | 1369 * |
1370 * feedback ( optional RefactoringFeedback ) | 1370 * feedback (optional RefactoringFeedback) |
1371 * | 1371 * |
1372 * Data used to provide feedback to the user. The structure of the data is | 1372 * Data used to provide feedback to the user. The structure of the data is |
1373 * dependent on the kind of refactoring being created. The data that is | 1373 * dependent on the kind of refactoring being created. The data that is |
1374 * returned is documented in the section titled Refactorings, labeled as | 1374 * returned is documented in the section titled Refactorings, labeled as |
1375 * “Feedback”. | 1375 * “Feedback”. |
1376 * | 1376 * |
1377 * change ( optional SourceChange ) | 1377 * change (optional SourceChange) |
1378 * | 1378 * |
1379 * The changes that are to be applied to affect the refactoring. This field | 1379 * The changes that are to be applied to affect the refactoring. This field |
1380 * will be omitted if there are problems that prevent a set of changes from | 1380 * will be omitted if there are problems that prevent a set of changes from |
1381 * being computed, such as having no options specified for a refactoring | 1381 * being computed, such as having no options specified for a refactoring |
1382 * that requires them, or if only validation was requested. | 1382 * that requires them, or if only validation was requested. |
1383 * | 1383 * |
1384 * potentialEdits ( optional List<String> ) | 1384 * potentialEdits (optional List<String>) |
1385 * | 1385 * |
1386 * The ids of source edits that are not known to be valid. An edit is not | 1386 * The ids of source edits that are not known to be valid. An edit is not |
1387 * known to be valid if there was insufficient type information for the | 1387 * known to be valid if there was insufficient type information for the |
1388 * server to be able to determine whether or not the code needs to be | 1388 * server to be able to determine whether or not the code needs to be |
1389 * modified, such as when a member is being renamed and there is a | 1389 * modified, such as when a member is being renamed and there is a |
1390 * reference to a member from an unknown type. This field will be omitted | 1390 * reference to a member from an unknown type. This field will be omitted |
1391 * if the change field is omitted or if there are no potential edits for | 1391 * if the change field is omitted or if there are no potential edits for |
1392 * the refactoring. | 1392 * the refactoring. |
1393 */ | 1393 */ |
1394 Future<EditGetRefactoringResult> sendEditGetRefactoring(RefactoringKind kind,
String file, int offset, int length, bool validateOnly, {RefactoringOptions opti
ons}) async { | 1394 Future<EditGetRefactoringResult> sendEditGetRefactoring(RefactoringKind kind,
String file, int offset, int length, bool validateOnly, {RefactoringOptions opti
ons}) async { |
1395 var params = new EditGetRefactoringParams(kind, file, offset, length, valida
teOnly, options: options).toJson(); | 1395 var params = new EditGetRefactoringParams(kind, file, offset, length, valida
teOnly, options: options).toJson(); |
1396 var result = await server.send("edit.getRefactoring", params); | 1396 var result = await server.send("edit.getRefactoring", params); |
1397 ResponseDecoder decoder = new ResponseDecoder(kind); | 1397 ResponseDecoder decoder = new ResponseDecoder(kind); |
1398 return new EditGetRefactoringResult.fromJson(decoder, 'result', result); | 1398 return new EditGetRefactoringResult.fromJson(decoder, 'result', result); |
1399 } | 1399 } |
1400 | 1400 |
1401 /** | 1401 /** |
1402 * Sort all of the directives, unit and class members of the given Dart file. | 1402 * Sort all of the directives, unit and class members of the given Dart file. |
1403 * | 1403 * |
1404 * If a request is made for a file that does not exist, does not belong to an | 1404 * If a request is made for a file that does not exist, does not belong to an |
1405 * analysis root or is not a Dart file, SORT_MEMBERS_INVALID_FILE will be | 1405 * analysis root or is not a Dart file, SORT_MEMBERS_INVALID_FILE will be |
1406 * generated. | 1406 * generated. |
1407 * | 1407 * |
1408 * If the Dart file has scan or parse errors, SORT_MEMBERS_PARSE_ERRORS will | 1408 * If the Dart file has scan or parse errors, SORT_MEMBERS_PARSE_ERRORS will |
1409 * be generated. | 1409 * be generated. |
1410 * | 1410 * |
1411 * Parameters | 1411 * Parameters |
1412 * | 1412 * |
1413 * file ( FilePath ) | 1413 * file (FilePath) |
1414 * | 1414 * |
1415 * The Dart file to sort. | 1415 * The Dart file to sort. |
1416 * | 1416 * |
1417 * Returns | 1417 * Returns |
1418 * | 1418 * |
1419 * edit ( SourceFileEdit ) | 1419 * edit (SourceFileEdit) |
1420 * | 1420 * |
1421 * The file edit that is to be applied to the given file to effect the | 1421 * The file edit that is to be applied to the given file to effect the |
1422 * sorting. | 1422 * sorting. |
1423 */ | 1423 */ |
1424 Future<EditSortMembersResult> sendEditSortMembers(String file) async { | 1424 Future<EditSortMembersResult> sendEditSortMembers(String file) async { |
1425 var params = new EditSortMembersParams(file).toJson(); | 1425 var params = new EditSortMembersParams(file).toJson(); |
1426 var result = await server.send("edit.sortMembers", params); | 1426 var result = await server.send("edit.sortMembers", params); |
1427 ResponseDecoder decoder = new ResponseDecoder(null); | 1427 ResponseDecoder decoder = new ResponseDecoder(null); |
1428 return new EditSortMembersResult.fromJson(decoder, 'result', result); | 1428 return new EditSortMembersResult.fromJson(decoder, 'result', result); |
1429 } | 1429 } |
1430 | 1430 |
1431 /** | 1431 /** |
1432 * Organizes all of the directives - removes unused imports and sorts | 1432 * Organizes all of the directives - removes unused imports and sorts |
1433 * directives of the given Dart file according to the Dart Style Guide. | 1433 * directives of the given Dart file according to the Dart Style Guide. |
1434 * | 1434 * |
1435 * If a request is made for a file that does not exist, does not belong to an | 1435 * If a request is made for a file that does not exist, does not belong to an |
1436 * analysis root or is not a Dart file, FILE_NOT_ANALYZED will be generated. | 1436 * analysis root or is not a Dart file, FILE_NOT_ANALYZED will be generated. |
1437 * | 1437 * |
1438 * If directives of the Dart file cannot be organized, for example because it | 1438 * If directives of the Dart file cannot be organized, for example because it |
1439 * has scan or parse errors, or by other reasons, ORGANIZE_DIRECTIVES_ERROR | 1439 * has scan or parse errors, or by other reasons, ORGANIZE_DIRECTIVES_ERROR |
1440 * will be generated. The message will provide details about the reason. | 1440 * will be generated. The message will provide details about the reason. |
1441 * | 1441 * |
1442 * Parameters | 1442 * Parameters |
1443 * | 1443 * |
1444 * file ( FilePath ) | 1444 * file (FilePath) |
1445 * | 1445 * |
1446 * The Dart file to organize directives in. | 1446 * The Dart file to organize directives in. |
1447 * | 1447 * |
1448 * Returns | 1448 * Returns |
1449 * | 1449 * |
1450 * edit ( SourceFileEdit ) | 1450 * edit (SourceFileEdit) |
1451 * | 1451 * |
1452 * The file edit that is to be applied to the given file to effect the | 1452 * The file edit that is to be applied to the given file to effect the |
1453 * organizing. | 1453 * organizing. |
1454 */ | 1454 */ |
1455 Future<EditOrganizeDirectivesResult> sendEditOrganizeDirectives(String file) a
sync { | 1455 Future<EditOrganizeDirectivesResult> sendEditOrganizeDirectives(String file) a
sync { |
1456 var params = new EditOrganizeDirectivesParams(file).toJson(); | 1456 var params = new EditOrganizeDirectivesParams(file).toJson(); |
1457 var result = await server.send("edit.organizeDirectives", params); | 1457 var result = await server.send("edit.organizeDirectives", params); |
1458 ResponseDecoder decoder = new ResponseDecoder(null); | 1458 ResponseDecoder decoder = new ResponseDecoder(null); |
1459 return new EditOrganizeDirectivesResult.fromJson(decoder, 'result', result); | 1459 return new EditOrganizeDirectivesResult.fromJson(decoder, 'result', result); |
1460 } | 1460 } |
1461 | 1461 |
1462 /** | 1462 /** |
1463 * Create an execution context for the executable file with the given path. | 1463 * Create an execution context for the executable file with the given path. |
1464 * The context that is created will persist until execution.deleteContext is | 1464 * The context that is created will persist until execution.deleteContext is |
1465 * used to delete it. Clients, therefore, are responsible for managing the | 1465 * used to delete it. Clients, therefore, are responsible for managing the |
1466 * lifetime of execution contexts. | 1466 * lifetime of execution contexts. |
1467 * | 1467 * |
1468 * Parameters | 1468 * Parameters |
1469 * | 1469 * |
1470 * contextRoot ( FilePath ) | 1470 * contextRoot (FilePath) |
1471 * | 1471 * |
1472 * The path of the Dart or HTML file that will be launched, or the path of | 1472 * The path of the Dart or HTML file that will be launched, or the path of |
1473 * the directory containing the file. | 1473 * the directory containing the file. |
1474 * | 1474 * |
1475 * Returns | 1475 * Returns |
1476 * | 1476 * |
1477 * id ( ExecutionContextId ) | 1477 * id (ExecutionContextId) |
1478 * | 1478 * |
1479 * The identifier used to refer to the execution context that was created. | 1479 * The identifier used to refer to the execution context that was created. |
1480 */ | 1480 */ |
1481 Future<ExecutionCreateContextResult> sendExecutionCreateContext(String context
Root) async { | 1481 Future<ExecutionCreateContextResult> sendExecutionCreateContext(String context
Root) async { |
1482 var params = new ExecutionCreateContextParams(contextRoot).toJson(); | 1482 var params = new ExecutionCreateContextParams(contextRoot).toJson(); |
1483 var result = await server.send("execution.createContext", params); | 1483 var result = await server.send("execution.createContext", params); |
1484 ResponseDecoder decoder = new ResponseDecoder(null); | 1484 ResponseDecoder decoder = new ResponseDecoder(null); |
1485 return new ExecutionCreateContextResult.fromJson(decoder, 'result', result); | 1485 return new ExecutionCreateContextResult.fromJson(decoder, 'result', result); |
1486 } | 1486 } |
1487 | 1487 |
1488 /** | 1488 /** |
1489 * Delete the execution context with the given identifier. The context id is | 1489 * Delete the execution context with the given identifier. The context id is |
1490 * no longer valid after this command. The server is allowed to re-use ids | 1490 * no longer valid after this command. The server is allowed to re-use ids |
1491 * when they are no longer valid. | 1491 * when they are no longer valid. |
1492 * | 1492 * |
1493 * Parameters | 1493 * Parameters |
1494 * | 1494 * |
1495 * id ( ExecutionContextId ) | 1495 * id (ExecutionContextId) |
1496 * | 1496 * |
1497 * The identifier of the execution context that is to be deleted. | 1497 * The identifier of the execution context that is to be deleted. |
1498 */ | 1498 */ |
1499 Future sendExecutionDeleteContext(String id) async { | 1499 Future sendExecutionDeleteContext(String id) async { |
1500 var params = new ExecutionDeleteContextParams(id).toJson(); | 1500 var params = new ExecutionDeleteContextParams(id).toJson(); |
1501 var result = await server.send("execution.deleteContext", params); | 1501 var result = await server.send("execution.deleteContext", params); |
1502 expect(result, isNull); | 1502 expect(result, isNull); |
1503 return null; | 1503 return null; |
1504 } | 1504 } |
1505 | 1505 |
(...skipping 13 matching lines...) Expand all Loading... |
1519 * If the uri field is provided and the value is not a valid URI or if the | 1519 * If the uri field is provided and the value is not a valid URI or if the |
1520 * URI references something that is not a file (either a file that does not | 1520 * URI references something that is not a file (either a file that does not |
1521 * exist or something other than a file), then an error of type | 1521 * exist or something other than a file), then an error of type |
1522 * INVALID_PARAMETER will be generated. | 1522 * INVALID_PARAMETER will be generated. |
1523 * | 1523 * |
1524 * If the contextRoot used to create the execution context does not exist, | 1524 * If the contextRoot used to create the execution context does not exist, |
1525 * then an error of type INVALID_EXECUTION_CONTEXT will be generated. | 1525 * then an error of type INVALID_EXECUTION_CONTEXT will be generated. |
1526 * | 1526 * |
1527 * Parameters | 1527 * Parameters |
1528 * | 1528 * |
1529 * id ( ExecutionContextId ) | 1529 * id (ExecutionContextId) |
1530 * | 1530 * |
1531 * The identifier of the execution context in which the URI is to be | 1531 * The identifier of the execution context in which the URI is to be |
1532 * mapped. | 1532 * mapped. |
1533 * | 1533 * |
1534 * file ( optional FilePath ) | 1534 * file (optional FilePath) |
1535 * | 1535 * |
1536 * The path of the file to be mapped into a URI. | 1536 * The path of the file to be mapped into a URI. |
1537 * | 1537 * |
1538 * uri ( optional String ) | 1538 * uri (optional String) |
1539 * | 1539 * |
1540 * The URI to be mapped into a file path. | 1540 * The URI to be mapped into a file path. |
1541 * | 1541 * |
1542 * Returns | 1542 * Returns |
1543 * | 1543 * |
1544 * file ( optional FilePath ) | 1544 * file (optional FilePath) |
1545 * | 1545 * |
1546 * The file to which the URI was mapped. This field is omitted if the uri | 1546 * The file to which the URI was mapped. This field is omitted if the uri |
1547 * field was not given in the request. | 1547 * field was not given in the request. |
1548 * | 1548 * |
1549 * uri ( optional String ) | 1549 * uri (optional String) |
1550 * | 1550 * |
1551 * The URI to which the file path was mapped. This field is omitted if the | 1551 * The URI to which the file path was mapped. This field is omitted if the |
1552 * file field was not given in the request. | 1552 * file field was not given in the request. |
1553 */ | 1553 */ |
1554 Future<ExecutionMapUriResult> sendExecutionMapUri(String id, {String file, Str
ing uri}) async { | 1554 Future<ExecutionMapUriResult> sendExecutionMapUri(String id, {String file, Str
ing uri}) async { |
1555 var params = new ExecutionMapUriParams(id, file: file, uri: uri).toJson(); | 1555 var params = new ExecutionMapUriParams(id, file: file, uri: uri).toJson(); |
1556 var result = await server.send("execution.mapUri", params); | 1556 var result = await server.send("execution.mapUri", params); |
1557 ResponseDecoder decoder = new ResponseDecoder(null); | 1557 ResponseDecoder decoder = new ResponseDecoder(null); |
1558 return new ExecutionMapUriResult.fromJson(decoder, 'result', result); | 1558 return new ExecutionMapUriResult.fromJson(decoder, 'result', result); |
1559 } | 1559 } |
1560 | 1560 |
1561 /** | 1561 /** |
1562 * Subscribe for services. All previous subscriptions are replaced by the | 1562 * Subscribe for services. All previous subscriptions are replaced by the |
1563 * given set of services. | 1563 * given set of services. |
1564 * | 1564 * |
1565 * It is an error if any of the elements in the list are not valid services. | 1565 * It is an error if any of the elements in the list are not valid services. |
1566 * If there is an error, then the current subscriptions will remain | 1566 * If there is an error, then the current subscriptions will remain |
1567 * unchanged. | 1567 * unchanged. |
1568 * | 1568 * |
1569 * Parameters | 1569 * Parameters |
1570 * | 1570 * |
1571 * subscriptions ( List<ExecutionService> ) | 1571 * subscriptions (List<ExecutionService>) |
1572 * | 1572 * |
1573 * A list of the services being subscribed to. | 1573 * A list of the services being subscribed to. |
1574 */ | 1574 */ |
1575 Future sendExecutionSetSubscriptions(List<ExecutionService> subscriptions) asy
nc { | 1575 Future sendExecutionSetSubscriptions(List<ExecutionService> subscriptions) asy
nc { |
1576 var params = new ExecutionSetSubscriptionsParams(subscriptions).toJson(); | 1576 var params = new ExecutionSetSubscriptionsParams(subscriptions).toJson(); |
1577 var result = await server.send("execution.setSubscriptions", params); | 1577 var result = await server.send("execution.setSubscriptions", params); |
1578 expect(result, isNull); | 1578 expect(result, isNull); |
1579 return null; | 1579 return null; |
1580 } | 1580 } |
1581 | 1581 |
1582 /** | 1582 /** |
1583 * Reports information needed to allow a single file to be launched. | 1583 * Reports information needed to allow a single file to be launched. |
1584 * | 1584 * |
1585 * This notification is not subscribed to by default. Clients can subscribe | 1585 * This notification is not subscribed to by default. Clients can subscribe |
1586 * by including the value "LAUNCH_DATA" in the list of services passed in an | 1586 * by including the value "LAUNCH_DATA" in the list of services passed in an |
1587 * execution.setSubscriptions request. | 1587 * execution.setSubscriptions request. |
1588 * | 1588 * |
1589 * Parameters | 1589 * Parameters |
1590 * | 1590 * |
1591 * file ( FilePath ) | 1591 * file (FilePath) |
1592 * | 1592 * |
1593 * The file for which launch data is being provided. This will either be a | 1593 * The file for which launch data is being provided. This will either be a |
1594 * Dart library or an HTML file. | 1594 * Dart library or an HTML file. |
1595 * | 1595 * |
1596 * kind ( optional ExecutableKind ) | 1596 * kind (optional ExecutableKind) |
1597 * | 1597 * |
1598 * The kind of the executable file. This field is omitted if the file is | 1598 * The kind of the executable file. This field is omitted if the file is |
1599 * not a Dart file. | 1599 * not a Dart file. |
1600 * | 1600 * |
1601 * referencedFiles ( optional List<FilePath> ) | 1601 * referencedFiles (optional List<FilePath>) |
1602 * | 1602 * |
1603 * A list of the Dart files that are referenced by the file. This field is | 1603 * A list of the Dart files that are referenced by the file. This field is |
1604 * omitted if the file is not an HTML file. | 1604 * omitted if the file is not an HTML file. |
1605 */ | 1605 */ |
1606 Stream<ExecutionLaunchDataParams> onExecutionLaunchData; | 1606 Stream<ExecutionLaunchDataParams> onExecutionLaunchData; |
1607 | 1607 |
1608 /** | 1608 /** |
1609 * Stream controller for [onExecutionLaunchData]. | 1609 * Stream controller for [onExecutionLaunchData]. |
1610 */ | 1610 */ |
1611 StreamController<ExecutionLaunchDataParams> _onExecutionLaunchData; | 1611 StreamController<ExecutionLaunchDataParams> _onExecutionLaunchData; |
1612 | 1612 |
1613 /** | 1613 /** |
1614 * Return server diagnostics. | 1614 * Return server diagnostics. |
1615 * | 1615 * |
1616 * Returns | 1616 * Returns |
1617 * | 1617 * |
1618 * contexts ( List<ContextData> ) | 1618 * contexts (List<ContextData>) |
1619 * | 1619 * |
1620 * The list of analysis contexts. | 1620 * The list of analysis contexts. |
1621 */ | 1621 */ |
1622 Future<DiagnosticGetDiagnosticsResult> sendDiagnosticGetDiagnostics() async { | 1622 Future<DiagnosticGetDiagnosticsResult> sendDiagnosticGetDiagnostics() async { |
1623 var result = await server.send("diagnostic.getDiagnostics", null); | 1623 var result = await server.send("diagnostic.getDiagnostics", null); |
1624 ResponseDecoder decoder = new ResponseDecoder(null); | 1624 ResponseDecoder decoder = new ResponseDecoder(null); |
1625 return new DiagnosticGetDiagnosticsResult.fromJson(decoder, 'result', result
); | 1625 return new DiagnosticGetDiagnosticsResult.fromJson(decoder, 'result', result
); |
1626 } | 1626 } |
1627 | 1627 |
1628 /** | 1628 /** |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1740 case "execution.launchData": | 1740 case "execution.launchData": |
1741 expect(params, isExecutionLaunchDataParams); | 1741 expect(params, isExecutionLaunchDataParams); |
1742 _onExecutionLaunchData.add(new ExecutionLaunchDataParams.fromJson(decode
r, 'params', params)); | 1742 _onExecutionLaunchData.add(new ExecutionLaunchDataParams.fromJson(decode
r, 'params', params)); |
1743 break; | 1743 break; |
1744 default: | 1744 default: |
1745 fail('Unexpected notification: $event'); | 1745 fail('Unexpected notification: $event'); |
1746 break; | 1746 break; |
1747 } | 1747 } |
1748 } | 1748 } |
1749 } | 1749 } |
OLD | NEW |