Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: pkg/analysis_server/test/integration/integration_test_methods.dart

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

Powered by Google App Engine
This is Rietveld 408576698