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

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: 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)
Brian Wilkerson 2017/04/09 16:30:53 I really don't think the at sign adds anything eit
devoncarew 2017/04/09 19:43:21 Changed to use '(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 Future sendAnalysisUpdateOptions(AnalysisOptions options) async { 595 Future sendAnalysisUpdateOptions(AnalysisOptions options) async {
596 var params = new AnalysisUpdateOptionsParams(options).toJson(); 596 var params = new AnalysisUpdateOptionsParams(options).toJson();
597 var result = await server.send("analysis.updateOptions", params); 597 var result = await server.send("analysis.updateOptions", params);
598 outOfTestExpect(result, isNull); 598 outOfTestExpect(result, isNull);
599 return null; 599 return null;
600 } 600 }
601 601
602 /** 602 /**
603 * Reports the paths of the files that are being analyzed. 603 * Reports the paths of the files that are being analyzed.
604 * 604 *
605 * This notification is not subscribed to by default. Clients can subscribe 605 * 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 606 * by including the value "ANALYZED_FILES" in the list of services passed in
607 * an analysis.setGeneralSubscriptions request. 607 * an analysis.setGeneralSubscriptions request.
608 * 608 *
609 * Parameters 609 * Parameters
610 * 610 *
611 * directories (List<FilePath>) 611 * directories: List<FilePath>
612 * 612 *
613 * A list of the paths of the files that are being analyzed. 613 * A list of the paths of the files that are being analyzed.
614 */ 614 */
615 Stream<AnalysisAnalyzedFilesParams> onAnalysisAnalyzedFiles; 615 Stream<AnalysisAnalyzedFilesParams> onAnalysisAnalyzedFiles;
616 616
617 /** 617 /**
618 * Stream controller for [onAnalysisAnalyzedFiles]. 618 * Stream controller for [onAnalysisAnalyzedFiles].
619 */ 619 */
620 StreamController<AnalysisAnalyzedFilesParams> _onAnalysisAnalyzedFiles; 620 StreamController<AnalysisAnalyzedFilesParams> _onAnalysisAnalyzedFiles;
621 621
622 /** 622 /**
623 * Reports the errors associated with a given file. The set of errors 623 * 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 624 * included in the notification is always a complete list that supersedes any
625 * previously reported errors. 625 * previously reported errors.
626 * 626 *
627 * Parameters 627 * Parameters
628 * 628 *
629 * file (FilePath) 629 * file: FilePath
630 * 630 *
631 * The file containing the errors. 631 * The file containing the errors.
632 * 632 *
633 * errors (List<AnalysisError>) 633 * errors: List<AnalysisError>
634 * 634 *
635 * The errors contained in the file. 635 * The errors contained in the file.
636 */ 636 */
637 Stream<AnalysisErrorsParams> onAnalysisErrors; 637 Stream<AnalysisErrorsParams> onAnalysisErrors;
638 638
639 /** 639 /**
640 * Stream controller for [onAnalysisErrors]. 640 * Stream controller for [onAnalysisErrors].
641 */ 641 */
642 StreamController<AnalysisErrorsParams> _onAnalysisErrors; 642 StreamController<AnalysisErrorsParams> _onAnalysisErrors;
643 643
644 /** 644 /**
645 * Reports that any analysis results that were previously associated with the 645 * 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 646 * 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 647 * longer being analyzed, either because the analysis root that contained it
648 * is no longer being analyzed or because the file no longer exists. 648 * is no longer being analyzed or because the file no longer exists.
649 * 649 *
650 * If a file is included in this notification and at some later time a 650 * 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 651 * 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 652 * that the file is once again being analyzed and the information should be
653 * processed. 653 * processed.
654 * 654 *
655 * It is not possible to subscribe to or unsubscribe from this notification. 655 * It is not possible to subscribe to or unsubscribe from this notification.
656 * 656 *
657 * Parameters 657 * Parameters
658 * 658 *
659 * files (List<FilePath>) 659 * files: List<FilePath>
660 * 660 *
661 * The files that are no longer being analyzed. 661 * The files that are no longer being analyzed.
662 */ 662 */
663 Stream<AnalysisFlushResultsParams> onAnalysisFlushResults; 663 Stream<AnalysisFlushResultsParams> onAnalysisFlushResults;
664 664
665 /** 665 /**
666 * Stream controller for [onAnalysisFlushResults]. 666 * Stream controller for [onAnalysisFlushResults].
667 */ 667 */
668 StreamController<AnalysisFlushResultsParams> _onAnalysisFlushResults; 668 StreamController<AnalysisFlushResultsParams> _onAnalysisFlushResults;
669 669
670 /** 670 /**
671 * Reports the folding regions associated with a given file. Folding regions 671 * 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 672 * 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 673 * element, such as a method, is nested inside another foldable element such
674 * as a class. 674 * as a class.
675 * 675 *
676 * This notification is not subscribed to by default. Clients can subscribe 676 * 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 677 * by including the value "FOLDING" in the list of services passed in an
678 * analysis.setSubscriptions request. 678 * analysis.setSubscriptions request.
679 * 679 *
680 * Parameters 680 * Parameters
681 * 681 *
682 * file (FilePath) 682 * file: FilePath
683 * 683 *
684 * The file containing the folding regions. 684 * The file containing the folding regions.
685 * 685 *
686 * regions (List<FoldingRegion>) 686 * regions: List<FoldingRegion>
687 * 687 *
688 * The folding regions contained in the file. 688 * The folding regions contained in the file.
689 */ 689 */
690 Stream<AnalysisFoldingParams> onAnalysisFolding; 690 Stream<AnalysisFoldingParams> onAnalysisFolding;
691 691
692 /** 692 /**
693 * Stream controller for [onAnalysisFolding]. 693 * Stream controller for [onAnalysisFolding].
694 */ 694 */
695 StreamController<AnalysisFoldingParams> _onAnalysisFolding; 695 StreamController<AnalysisFoldingParams> _onAnalysisFolding;
696 696
697 /** 697 /**
698 * Reports the highlight regions associated with a given file. 698 * Reports the highlight regions associated with a given file.
699 * 699 *
700 * This notification is not subscribed to by default. Clients can subscribe 700 * 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 701 * by including the value "HIGHLIGHTS" in the list of services passed in an
702 * analysis.setSubscriptions request. 702 * analysis.setSubscriptions request.
703 * 703 *
704 * Parameters 704 * Parameters
705 * 705 *
706 * file (FilePath) 706 * file: FilePath
707 * 707 *
708 * The file containing the highlight regions. 708 * The file containing the highlight regions.
709 * 709 *
710 * regions (List<HighlightRegion>) 710 * regions: List<HighlightRegion>
711 * 711 *
712 * The highlight regions contained in the file. Each highlight region 712 * The highlight regions contained in the file. Each highlight region
713 * represents a particular syntactic or semantic meaning associated with 713 * represents a particular syntactic or semantic meaning associated with
714 * some range. Note that the highlight regions that are returned can 714 * some range. Note that the highlight regions that are returned can
715 * overlap other highlight regions if there is more than one meaning 715 * overlap other highlight regions if there is more than one meaning
716 * associated with a particular region. 716 * associated with a particular region.
717 */ 717 */
718 Stream<AnalysisHighlightsParams> onAnalysisHighlights; 718 Stream<AnalysisHighlightsParams> onAnalysisHighlights;
719 719
720 /** 720 /**
721 * Stream controller for [onAnalysisHighlights]. 721 * Stream controller for [onAnalysisHighlights].
722 */ 722 */
723 StreamController<AnalysisHighlightsParams> _onAnalysisHighlights; 723 StreamController<AnalysisHighlightsParams> _onAnalysisHighlights;
724 724
725 /** 725 /**
726 * Reports the classes that are implemented or extended and class members 726 * Reports the classes that are implemented or extended and class members
727 * that are implemented or overridden in a file. 727 * that are implemented or overridden in a file.
728 * 728 *
729 * This notification is not subscribed to by default. Clients can subscribe 729 * 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 730 * by including the value "IMPLEMENTED" in the list of services passed in an
731 * analysis.setSubscriptions request. 731 * analysis.setSubscriptions request.
732 * 732 *
733 * Parameters 733 * Parameters
734 * 734 *
735 * file (FilePath) 735 * file: FilePath
736 * 736 *
737 * The file with which the implementations are associated. 737 * The file with which the implementations are associated.
738 * 738 *
739 * classes (List<ImplementedClass>) 739 * classes: List<ImplementedClass>
740 * 740 *
741 * The classes defined in the file that are implemented or extended. 741 * The classes defined in the file that are implemented or extended.
742 * 742 *
743 * members (List<ImplementedMember>) 743 * members: List<ImplementedMember>
744 * 744 *
745 * The member defined in the file that are implemented or overridden. 745 * The member defined in the file that are implemented or overridden.
746 */ 746 */
747 Stream<AnalysisImplementedParams> onAnalysisImplemented; 747 Stream<AnalysisImplementedParams> onAnalysisImplemented;
748 748
749 /** 749 /**
750 * Stream controller for [onAnalysisImplemented]. 750 * Stream controller for [onAnalysisImplemented].
751 */ 751 */
752 StreamController<AnalysisImplementedParams> _onAnalysisImplemented; 752 StreamController<AnalysisImplementedParams> _onAnalysisImplemented;
753 753
754 /** 754 /**
755 * Reports that the navigation information associated with a region of a 755 * Reports that the navigation information associated with a region of a
756 * single file has become invalid and should be re-requested. 756 * single file has become invalid and should be re-requested.
757 * 757 *
758 * This notification is not subscribed to by default. Clients can subscribe 758 * 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 759 * by including the value "INVALIDATE" in the list of services passed in an
760 * analysis.setSubscriptions request. 760 * analysis.setSubscriptions request.
761 * 761 *
762 * Parameters 762 * Parameters
763 * 763 *
764 * file (FilePath) 764 * file: FilePath
765 * 765 *
766 * The file whose information has been invalidated. 766 * The file whose information has been invalidated.
767 * 767 *
768 * offset (int) 768 * offset: int
769 * 769 *
770 * The offset of the invalidated region. 770 * The offset of the invalidated region.
771 * 771 *
772 * length (int) 772 * length: int
773 * 773 *
774 * The length of the invalidated region. 774 * The length of the invalidated region.
775 * 775 *
776 * delta (int) 776 * delta: int
777 * 777 *
778 * The delta to be applied to the offsets in information that follows the 778 * 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 779 * invalidated region in order to update it so that it doesn't need to be
780 * re-requested. 780 * re-requested.
781 */ 781 */
782 Stream<AnalysisInvalidateParams> onAnalysisInvalidate; 782 Stream<AnalysisInvalidateParams> onAnalysisInvalidate;
783 783
784 /** 784 /**
785 * Stream controller for [onAnalysisInvalidate]. 785 * Stream controller for [onAnalysisInvalidate].
786 */ 786 */
787 StreamController<AnalysisInvalidateParams> _onAnalysisInvalidate; 787 StreamController<AnalysisInvalidateParams> _onAnalysisInvalidate;
788 788
789 /** 789 /**
790 * Reports the navigation targets associated with a given file. 790 * Reports the navigation targets associated with a given file.
791 * 791 *
792 * This notification is not subscribed to by default. Clients can subscribe 792 * 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 793 * by including the value "NAVIGATION" in the list of services passed in an
794 * analysis.setSubscriptions request. 794 * analysis.setSubscriptions request.
795 * 795 *
796 * Parameters 796 * Parameters
797 * 797 *
798 * file (FilePath) 798 * file: FilePath
799 * 799 *
800 * The file containing the navigation regions. 800 * The file containing the navigation regions.
801 * 801 *
802 * regions (List<NavigationRegion>) 802 * regions: List<NavigationRegion>
803 * 803 *
804 * The navigation regions contained in the file. The regions are sorted by 804 * The navigation regions contained in the file. The regions are sorted by
805 * their offsets. Each navigation region represents a list of targets 805 * their offsets. Each navigation region represents a list of targets
806 * associated with some range. The lists will usually contain a single 806 * 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 807 * 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 808 * multiple libraries or in Dart code that is compiled against multiple
809 * versions of a package. Note that the navigation regions that are 809 * versions of a package. Note that the navigation regions that are
810 * returned do not overlap other navigation regions. 810 * returned do not overlap other navigation regions.
811 * 811 *
812 * targets (List<NavigationTarget>) 812 * targets: List<NavigationTarget>
813 * 813 *
814 * The navigation targets referenced in the file. They are referenced by 814 * The navigation targets referenced in the file. They are referenced by
815 * NavigationRegions by their index in this array. 815 * NavigationRegions by their index in this array.
816 * 816 *
817 * files (List<FilePath>) 817 * files: List<FilePath>
818 * 818 *
819 * The files containing navigation targets referenced in the file. They are 819 * The files containing navigation targets referenced in the file. They are
820 * referenced by NavigationTargets by their index in this array. 820 * referenced by NavigationTargets by their index in this array.
821 */ 821 */
822 Stream<AnalysisNavigationParams> onAnalysisNavigation; 822 Stream<AnalysisNavigationParams> onAnalysisNavigation;
823 823
824 /** 824 /**
825 * Stream controller for [onAnalysisNavigation]. 825 * Stream controller for [onAnalysisNavigation].
826 */ 826 */
827 StreamController<AnalysisNavigationParams> _onAnalysisNavigation; 827 StreamController<AnalysisNavigationParams> _onAnalysisNavigation;
828 828
829 /** 829 /**
830 * Reports the occurrences of references to elements within a single file. 830 * Reports the occurrences of references to elements within a single file.
831 * 831 *
832 * This notification is not subscribed to by default. Clients can subscribe 832 * 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 833 * by including the value "OCCURRENCES" in the list of services passed in an
834 * analysis.setSubscriptions request. 834 * analysis.setSubscriptions request.
835 * 835 *
836 * Parameters 836 * Parameters
837 * 837 *
838 * file (FilePath) 838 * file: FilePath
839 * 839 *
840 * The file in which the references occur. 840 * The file in which the references occur.
841 * 841 *
842 * occurrences (List<Occurrences>) 842 * occurrences: List<Occurrences>
843 * 843 *
844 * The occurrences of references to elements within the file. 844 * The occurrences of references to elements within the file.
845 */ 845 */
846 Stream<AnalysisOccurrencesParams> onAnalysisOccurrences; 846 Stream<AnalysisOccurrencesParams> onAnalysisOccurrences;
847 847
848 /** 848 /**
849 * Stream controller for [onAnalysisOccurrences]. 849 * Stream controller for [onAnalysisOccurrences].
850 */ 850 */
851 StreamController<AnalysisOccurrencesParams> _onAnalysisOccurrences; 851 StreamController<AnalysisOccurrencesParams> _onAnalysisOccurrences;
852 852
853 /** 853 /**
854 * Reports the outline associated with a single file. 854 * Reports the outline associated with a single file.
855 * 855 *
856 * This notification is not subscribed to by default. Clients can subscribe 856 * 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 857 * by including the value "OUTLINE" in the list of services passed in an
858 * analysis.setSubscriptions request. 858 * analysis.setSubscriptions request.
859 * 859 *
860 * Parameters 860 * Parameters
861 * 861 *
862 * file (FilePath) 862 * file: FilePath
863 * 863 *
864 * The file with which the outline is associated. 864 * The file with which the outline is associated.
865 * 865 *
866 * kind (FileKind) 866 * kind: FileKind
867 * 867 *
868 * The kind of the file. 868 * The kind of the file.
869 * 869 *
870 * libraryName (optional String) 870 * libraryName: String (@optional)
871 * 871 *
872 * The name of the library defined by the file using a "library" directive, 872 * 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" 873 * or referenced by a "part of" directive. If both "library" and "part of"
874 * directives are present, then the "library" directive takes precedence. 874 * directives are present, then the "library" directive takes precedence.
875 * This field will be omitted if the file has neither "library" nor "part 875 * This field will be omitted if the file has neither "library" nor "part
876 * of" directives. 876 * of" directives.
877 * 877 *
878 * outline (Outline) 878 * outline: Outline
879 * 879 *
880 * The outline associated with the file. 880 * The outline associated with the file.
881 */ 881 */
882 Stream<AnalysisOutlineParams> onAnalysisOutline; 882 Stream<AnalysisOutlineParams> onAnalysisOutline;
883 883
884 /** 884 /**
885 * Stream controller for [onAnalysisOutline]. 885 * Stream controller for [onAnalysisOutline].
886 */ 886 */
887 StreamController<AnalysisOutlineParams> _onAnalysisOutline; 887 StreamController<AnalysisOutlineParams> _onAnalysisOutline;
888 888
889 /** 889 /**
890 * Reports the overriding members in a file. 890 * Reports the overriding members in a file.
891 * 891 *
892 * This notification is not subscribed to by default. Clients can subscribe 892 * 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 893 * by including the value "OVERRIDES" in the list of services passed in an
894 * analysis.setSubscriptions request. 894 * analysis.setSubscriptions request.
895 * 895 *
896 * Parameters 896 * Parameters
897 * 897 *
898 * file (FilePath) 898 * file: FilePath
899 * 899 *
900 * The file with which the overrides are associated. 900 * The file with which the overrides are associated.
901 * 901 *
902 * overrides (List<Override>) 902 * overrides: List<Override>
903 * 903 *
904 * The overrides associated with the file. 904 * The overrides associated with the file.
905 */ 905 */
906 Stream<AnalysisOverridesParams> onAnalysisOverrides; 906 Stream<AnalysisOverridesParams> onAnalysisOverrides;
907 907
908 /** 908 /**
909 * Stream controller for [onAnalysisOverrides]. 909 * Stream controller for [onAnalysisOverrides].
910 */ 910 */
911 StreamController<AnalysisOverridesParams> _onAnalysisOverrides; 911 StreamController<AnalysisOverridesParams> _onAnalysisOverrides;
912 912
913 /** 913 /**
914 * Request that completion suggestions for the given offset in the given file 914 * Request that completion suggestions for the given offset in the given file
915 * be returned. 915 * be returned.
916 * 916 *
917 * Parameters 917 * Parameters
918 * 918 *
919 * file (FilePath) 919 * file: FilePath
920 * 920 *
921 * The file containing the point at which suggestions are to be made. 921 * The file containing the point at which suggestions are to be made.
922 * 922 *
923 * offset (int) 923 * offset: int
924 * 924 *
925 * The offset within the file at which suggestions are to be made. 925 * The offset within the file at which suggestions are to be made.
926 * 926 *
927 * Returns 927 * Returns
928 * 928 *
929 * id (CompletionId) 929 * id: CompletionId
930 * 930 *
931 * The identifier used to associate results with this completion request. 931 * The identifier used to associate results with this completion request.
932 */ 932 */
933 Future<CompletionGetSuggestionsResult> sendCompletionGetSuggestions( 933 Future<CompletionGetSuggestionsResult> sendCompletionGetSuggestions(
934 String file, int offset) async { 934 String file, int offset) async {
935 var params = new CompletionGetSuggestionsParams(file, offset).toJson(); 935 var params = new CompletionGetSuggestionsParams(file, offset).toJson();
936 var result = await server.send("completion.getSuggestions", params); 936 var result = await server.send("completion.getSuggestions", params);
937 ResponseDecoder decoder = new ResponseDecoder(null); 937 ResponseDecoder decoder = new ResponseDecoder(null);
938 return new CompletionGetSuggestionsResult.fromJson( 938 return new CompletionGetSuggestionsResult.fromJson(
939 decoder, 'result', result); 939 decoder, 'result', result);
940 } 940 }
941 941
942 /** 942 /**
943 * Reports the completion suggestions that should be presented to the user. 943 * Reports the completion suggestions that should be presented to the user.
944 * The set of suggestions included in the notification is always a complete 944 * The set of suggestions included in the notification is always a complete
945 * list that supersedes any previously reported suggestions. 945 * list that supersedes any previously reported suggestions.
946 * 946 *
947 * Parameters 947 * Parameters
948 * 948 *
949 * id (CompletionId) 949 * id: CompletionId
950 * 950 *
951 * The id associated with the completion. 951 * The id associated with the completion.
952 * 952 *
953 * replacementOffset (int) 953 * replacementOffset: int
954 * 954 *
955 * The offset of the start of the text to be replaced. This will be 955 * 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 956 * different than the offset used to request the completion suggestions if
957 * there was a portion of an identifier before the original offset. In 957 * there was a portion of an identifier before the original offset. In
958 * particular, the replacementOffset will be the offset of the beginning of 958 * particular, the replacementOffset will be the offset of the beginning of
959 * said identifier. 959 * said identifier.
960 * 960 *
961 * replacementLength (int) 961 * replacementLength: int
962 * 962 *
963 * The length of the text to be replaced if the remainder of the identifier 963 * 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 964 * containing the cursor is to be replaced when the suggestion is applied
965 * (that is, the number of characters in the existing identifier). 965 * (that is, the number of characters in the existing identifier).
966 * 966 *
967 * results (List<CompletionSuggestion>) 967 * results: List<CompletionSuggestion>
968 * 968 *
969 * The completion suggestions being reported. The notification contains all 969 * The completion suggestions being reported. The notification contains all
970 * possible completions at the requested cursor position, even those that 970 * possible completions at the requested cursor position, even those that
971 * do not match the characters the user has already typed. This allows the 971 * 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 972 * client to respond to further keystrokes from the user without having to
973 * make additional requests. 973 * make additional requests.
974 * 974 *
975 * isLast (bool) 975 * isLast: bool
976 * 976 *
977 * True if this is that last set of results that will be returned for the 977 * True if this is that last set of results that will be returned for the
978 * indicated completion. 978 * indicated completion.
979 */ 979 */
980 Stream<CompletionResultsParams> onCompletionResults; 980 Stream<CompletionResultsParams> onCompletionResults;
981 981
982 /** 982 /**
983 * Stream controller for [onCompletionResults]. 983 * Stream controller for [onCompletionResults].
984 */ 984 */
985 StreamController<CompletionResultsParams> _onCompletionResults; 985 StreamController<CompletionResultsParams> _onCompletionResults;
986 986
987 /** 987 /**
988 * Perform a search for references to the element defined or referenced at 988 * Perform a search for references to the element defined or referenced at
989 * the given offset in the given file. 989 * the given offset in the given file.
990 * 990 *
991 * An identifier is returned immediately, and individual results will be 991 * An identifier is returned immediately, and individual results will be
992 * returned via the search.results notification as they become available. 992 * returned via the search.results notification as they become available.
993 * 993 *
994 * Parameters 994 * Parameters
995 * 995 *
996 * file (FilePath) 996 * file: FilePath
997 * 997 *
998 * The file containing the declaration of or reference to the element used 998 * The file containing the declaration of or reference to the element used
999 * to define the search. 999 * to define the search.
1000 * 1000 *
1001 * offset (int) 1001 * offset: int
1002 * 1002 *
1003 * The offset within the file of the declaration of or reference to the 1003 * The offset within the file of the declaration of or reference to the
1004 * element. 1004 * element.
1005 * 1005 *
1006 * includePotential (bool) 1006 * includePotential: bool
1007 * 1007 *
1008 * True if potential matches are to be included in the results. 1008 * True if potential matches are to be included in the results.
1009 * 1009 *
1010 * Returns 1010 * Returns
1011 * 1011 *
1012 * id (optional SearchId) 1012 * id: SearchId (@optional)
1013 * 1013 *
1014 * The identifier used to associate results with this search request. 1014 * The identifier used to associate results with this search request.
1015 * 1015 *
1016 * If no element was found at the given location, this field will be 1016 * 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 1017 * absent, and no results will be reported via the search.results
1018 * notification. 1018 * notification.
1019 * 1019 *
1020 * element (optional Element) 1020 * element: Element (@optional)
1021 * 1021 *
1022 * The element referenced or defined at the given offset and whose 1022 * The element referenced or defined at the given offset and whose
1023 * references will be returned in the search results. 1023 * references will be returned in the search results.
1024 * 1024 *
1025 * If no element was found at the given location, this field will be 1025 * If no element was found at the given location, this field will be
1026 * absent. 1026 * absent.
1027 */ 1027 */
1028 Future<SearchFindElementReferencesResult> sendSearchFindElementReferences( 1028 Future<SearchFindElementReferencesResult> sendSearchFindElementReferences(
1029 String file, int offset, bool includePotential) async { 1029 String file, int offset, bool includePotential) async {
1030 var params = 1030 var params =
1031 new SearchFindElementReferencesParams(file, offset, includePotential) 1031 new SearchFindElementReferencesParams(file, offset, includePotential)
1032 .toJson(); 1032 .toJson();
1033 var result = await server.send("search.findElementReferences", params); 1033 var result = await server.send("search.findElementReferences", params);
1034 ResponseDecoder decoder = new ResponseDecoder(null); 1034 ResponseDecoder decoder = new ResponseDecoder(null);
1035 return new SearchFindElementReferencesResult.fromJson( 1035 return new SearchFindElementReferencesResult.fromJson(
1036 decoder, 'result', result); 1036 decoder, 'result', result);
1037 } 1037 }
1038 1038
1039 /** 1039 /**
1040 * Perform a search for declarations of members whose name is equal to the 1040 * Perform a search for declarations of members whose name is equal to the
1041 * given name. 1041 * given name.
1042 * 1042 *
1043 * An identifier is returned immediately, and individual results will be 1043 * An identifier is returned immediately, and individual results will be
1044 * returned via the search.results notification as they become available. 1044 * returned via the search.results notification as they become available.
1045 * 1045 *
1046 * Parameters 1046 * Parameters
1047 * 1047 *
1048 * name (String) 1048 * name: String
1049 * 1049 *
1050 * The name of the declarations to be found. 1050 * The name of the declarations to be found.
1051 * 1051 *
1052 * Returns 1052 * Returns
1053 * 1053 *
1054 * id (SearchId) 1054 * id: SearchId
1055 * 1055 *
1056 * The identifier used to associate results with this search request. 1056 * The identifier used to associate results with this search request.
1057 */ 1057 */
1058 Future<SearchFindMemberDeclarationsResult> sendSearchFindMemberDeclarations( 1058 Future<SearchFindMemberDeclarationsResult> sendSearchFindMemberDeclarations(
1059 String name) async { 1059 String name) async {
1060 var params = new SearchFindMemberDeclarationsParams(name).toJson(); 1060 var params = new SearchFindMemberDeclarationsParams(name).toJson();
1061 var result = await server.send("search.findMemberDeclarations", params); 1061 var result = await server.send("search.findMemberDeclarations", params);
1062 ResponseDecoder decoder = new ResponseDecoder(null); 1062 ResponseDecoder decoder = new ResponseDecoder(null);
1063 return new SearchFindMemberDeclarationsResult.fromJson( 1063 return new SearchFindMemberDeclarationsResult.fromJson(
1064 decoder, 'result', result); 1064 decoder, 'result', result);
1065 } 1065 }
1066 1066
1067 /** 1067 /**
1068 * Perform a search for references to members whose name is equal to the 1068 * 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 1069 * 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 1070 * defined with the given name, so it is able to find references to undefined
1071 * members as well. 1071 * members as well.
1072 * 1072 *
1073 * An identifier is returned immediately, and individual results will be 1073 * An identifier is returned immediately, and individual results will be
1074 * returned via the search.results notification as they become available. 1074 * returned via the search.results notification as they become available.
1075 * 1075 *
1076 * Parameters 1076 * Parameters
1077 * 1077 *
1078 * name (String) 1078 * name: String
1079 * 1079 *
1080 * The name of the references to be found. 1080 * The name of the references to be found.
1081 * 1081 *
1082 * Returns 1082 * Returns
1083 * 1083 *
1084 * id (SearchId) 1084 * id: SearchId
1085 * 1085 *
1086 * The identifier used to associate results with this search request. 1086 * The identifier used to associate results with this search request.
1087 */ 1087 */
1088 Future<SearchFindMemberReferencesResult> sendSearchFindMemberReferences( 1088 Future<SearchFindMemberReferencesResult> sendSearchFindMemberReferences(
1089 String name) async { 1089 String name) async {
1090 var params = new SearchFindMemberReferencesParams(name).toJson(); 1090 var params = new SearchFindMemberReferencesParams(name).toJson();
1091 var result = await server.send("search.findMemberReferences", params); 1091 var result = await server.send("search.findMemberReferences", params);
1092 ResponseDecoder decoder = new ResponseDecoder(null); 1092 ResponseDecoder decoder = new ResponseDecoder(null);
1093 return new SearchFindMemberReferencesResult.fromJson( 1093 return new SearchFindMemberReferencesResult.fromJson(
1094 decoder, 'result', result); 1094 decoder, 'result', result);
1095 } 1095 }
1096 1096
1097 /** 1097 /**
1098 * Perform a search for declarations of top-level elements (classes, 1098 * Perform a search for declarations of top-level elements (classes,
1099 * typedefs, getters, setters, functions and fields) whose name matches the 1099 * typedefs, getters, setters, functions and fields) whose name matches the
1100 * given pattern. 1100 * given pattern.
1101 * 1101 *
1102 * An identifier is returned immediately, and individual results will be 1102 * An identifier is returned immediately, and individual results will be
1103 * returned via the search.results notification as they become available. 1103 * returned via the search.results notification as they become available.
1104 * 1104 *
1105 * Parameters 1105 * Parameters
1106 * 1106 *
1107 * pattern (String) 1107 * pattern: String
1108 * 1108 *
1109 * The regular expression used to match the names of the declarations to be 1109 * The regular expression used to match the names of the declarations to be
1110 * found. 1110 * found.
1111 * 1111 *
1112 * Returns 1112 * Returns
1113 * 1113 *
1114 * id (SearchId) 1114 * id: SearchId
1115 * 1115 *
1116 * The identifier used to associate results with this search request. 1116 * The identifier used to associate results with this search request.
1117 */ 1117 */
1118 Future<SearchFindTopLevelDeclarationsResult> 1118 Future<SearchFindTopLevelDeclarationsResult>
1119 sendSearchFindTopLevelDeclarations(String pattern) async { 1119 sendSearchFindTopLevelDeclarations(String pattern) async {
1120 var params = new SearchFindTopLevelDeclarationsParams(pattern).toJson(); 1120 var params = new SearchFindTopLevelDeclarationsParams(pattern).toJson();
1121 var result = await server.send("search.findTopLevelDeclarations", params); 1121 var result = await server.send("search.findTopLevelDeclarations", params);
1122 ResponseDecoder decoder = new ResponseDecoder(null); 1122 ResponseDecoder decoder = new ResponseDecoder(null);
1123 return new SearchFindTopLevelDeclarationsResult.fromJson( 1123 return new SearchFindTopLevelDeclarationsResult.fromJson(
1124 decoder, 'result', result); 1124 decoder, 'result', result);
1125 } 1125 }
1126 1126
1127 /** 1127 /**
1128 * Return the type hierarchy of the class declared or referenced at the given 1128 * Return the type hierarchy of the class declared or referenced at the given
1129 * location. 1129 * location.
1130 * 1130 *
1131 * Parameters 1131 * Parameters
1132 * 1132 *
1133 * file (FilePath) 1133 * file: FilePath
1134 * 1134 *
1135 * The file containing the declaration or reference to the type for which a 1135 * The file containing the declaration or reference to the type for which a
1136 * hierarchy is being requested. 1136 * hierarchy is being requested.
1137 * 1137 *
1138 * offset (int) 1138 * offset: int
1139 * 1139 *
1140 * The offset of the name of the type within the file. 1140 * The offset of the name of the type within the file.
1141 * 1141 *
1142 * superOnly (optional bool) 1142 * superOnly: bool (@optional)
1143 * 1143 *
1144 * True if the client is only requesting superclasses and interfaces 1144 * True if the client is only requesting superclasses and interfaces
1145 * hierarchy. 1145 * hierarchy.
1146 * 1146 *
1147 * Returns 1147 * Returns
1148 * 1148 *
1149 * hierarchyItems (optional List<TypeHierarchyItem>) 1149 * hierarchyItems: List<TypeHierarchyItem> (@optional)
1150 * 1150 *
1151 * A list of the types in the requested hierarchy. The first element of the 1151 * 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 1152 * 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 1153 * requested. The index of other elements of the list is unspecified, but
1154 * correspond to the integers used to reference supertype and subtype items 1154 * correspond to the integers used to reference supertype and subtype items
1155 * within the items. 1155 * within the items.
1156 * 1156 *
1157 * This field will be absent if the code at the given file and offset does 1157 * 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 1158 * not represent a type, or if the file has not been sufficiently analyzed
1159 * to allow a type hierarchy to be produced. 1159 * to allow a type hierarchy to be produced.
(...skipping 10 matching lines...) Expand all
1170 } 1170 }
1171 1171
1172 /** 1172 /**
1173 * Reports some or all of the results of performing a requested search. 1173 * Reports some or all of the results of performing a requested search.
1174 * Unlike other notifications, this notification contains search results that 1174 * Unlike other notifications, this notification contains search results that
1175 * should be added to any previously received search results associated with 1175 * should be added to any previously received search results associated with
1176 * the same search id. 1176 * the same search id.
1177 * 1177 *
1178 * Parameters 1178 * Parameters
1179 * 1179 *
1180 * id (SearchId) 1180 * id: SearchId
1181 * 1181 *
1182 * The id associated with the search. 1182 * The id associated with the search.
1183 * 1183 *
1184 * results (List<SearchResult>) 1184 * results: List<SearchResult>
1185 * 1185 *
1186 * The search results being reported. 1186 * The search results being reported.
1187 * 1187 *
1188 * isLast (bool) 1188 * isLast: bool
1189 * 1189 *
1190 * True if this is that last set of results that will be returned for the 1190 * True if this is that last set of results that will be returned for the
1191 * indicated search. 1191 * indicated search.
1192 */ 1192 */
1193 Stream<SearchResultsParams> onSearchResults; 1193 Stream<SearchResultsParams> onSearchResults;
1194 1194
1195 /** 1195 /**
1196 * Stream controller for [onSearchResults]. 1196 * Stream controller for [onSearchResults].
1197 */ 1197 */
1198 StreamController<SearchResultsParams> _onSearchResults; 1198 StreamController<SearchResultsParams> _onSearchResults;
1199 1199
1200 /** 1200 /**
1201 * Format the contents of a single file. The currently selected region of 1201 * 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 1202 * 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 1203 * 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 1204 * the original as possible, but whitespace at the beginning or end of the
1205 * selected region will be ignored. If preserving selection information is 1205 * selected region will be ignored. If preserving selection information is
1206 * not required, zero (0) can be specified for both the selection offset and 1206 * not required, zero (0) can be specified for both the selection offset and
1207 * selection length. 1207 * selection length.
1208 * 1208 *
1209 * If a request is made for a file which does not exist, or which is not 1209 * 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 1210 * currently subject to analysis (e.g. because it is not associated with any
1211 * analysis root specified to analysis.setAnalysisRoots), an error of type 1211 * analysis root specified to analysis.setAnalysisRoots), an error of type
1212 * FORMAT_INVALID_FILE will be generated. If the source contains syntax 1212 * FORMAT_INVALID_FILE will be generated. If the source contains syntax
1213 * errors, an error of type FORMAT_WITH_ERRORS will be generated. 1213 * errors, an error of type FORMAT_WITH_ERRORS will be generated.
1214 * 1214 *
1215 * Parameters 1215 * Parameters
1216 * 1216 *
1217 * file (FilePath) 1217 * file: FilePath
1218 * 1218 *
1219 * The file containing the code to be formatted. 1219 * The file containing the code to be formatted.
1220 * 1220 *
1221 * selectionOffset (int) 1221 * selectionOffset: int
1222 * 1222 *
1223 * The offset of the current selection in the file. 1223 * The offset of the current selection in the file.
1224 * 1224 *
1225 * selectionLength (int) 1225 * selectionLength: int
1226 * 1226 *
1227 * The length of the current selection in the file. 1227 * The length of the current selection in the file.
1228 * 1228 *
1229 * lineLength (optional int) 1229 * lineLength: int (@optional)
1230 * 1230 *
1231 * The line length to be used by the formatter. 1231 * The line length to be used by the formatter.
1232 * 1232 *
1233 * Returns 1233 * Returns
1234 * 1234 *
1235 * edits (List<SourceEdit>) 1235 * edits: List<SourceEdit>
1236 * 1236 *
1237 * The edit(s) to be applied in order to format the code. The list will be 1237 * 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). 1238 * empty if the code was already formatted (there are no changes).
1239 * 1239 *
1240 * selectionOffset (int) 1240 * selectionOffset: int
1241 * 1241 *
1242 * The offset of the selection after formatting the code. 1242 * The offset of the selection after formatting the code.
1243 * 1243 *
1244 * selectionLength (int) 1244 * selectionLength: int
1245 * 1245 *
1246 * The length of the selection after formatting the code. 1246 * The length of the selection after formatting the code.
1247 */ 1247 */
1248 Future<EditFormatResult> sendEditFormat( 1248 Future<EditFormatResult> sendEditFormat(
1249 String file, int selectionOffset, int selectionLength, 1249 String file, int selectionOffset, int selectionLength,
1250 {int lineLength}) async { 1250 {int lineLength}) async {
1251 var params = new EditFormatParams(file, selectionOffset, selectionLength, 1251 var params = new EditFormatParams(file, selectionOffset, selectionLength,
1252 lineLength: lineLength) 1252 lineLength: lineLength)
1253 .toJson(); 1253 .toJson();
1254 var result = await server.send("edit.format", params); 1254 var result = await server.send("edit.format", params);
1255 ResponseDecoder decoder = new ResponseDecoder(null); 1255 ResponseDecoder decoder = new ResponseDecoder(null);
1256 return new EditFormatResult.fromJson(decoder, 'result', result); 1256 return new EditFormatResult.fromJson(decoder, 'result', result);
1257 } 1257 }
1258 1258
1259 /** 1259 /**
1260 * Return the set of assists that are available at the given location. An 1260 * 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 1261 * 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 1262 * affects a single file and does not require user input in order to be
1263 * performed. 1263 * performed.
1264 * 1264 *
1265 * Parameters 1265 * Parameters
1266 * 1266 *
1267 * file (FilePath) 1267 * file: FilePath
1268 * 1268 *
1269 * The file containing the code for which assists are being requested. 1269 * The file containing the code for which assists are being requested.
1270 * 1270 *
1271 * offset (int) 1271 * offset: int
1272 * 1272 *
1273 * The offset of the code for which assists are being requested. 1273 * The offset of the code for which assists are being requested.
1274 * 1274 *
1275 * length (int) 1275 * length: int
1276 * 1276 *
1277 * The length of the code for which assists are being requested. 1277 * The length of the code for which assists are being requested.
1278 * 1278 *
1279 * Returns 1279 * Returns
1280 * 1280 *
1281 * assists (List<SourceChange>) 1281 * assists: List<SourceChange>
1282 * 1282 *
1283 * The assists that are available at the given location. 1283 * The assists that are available at the given location.
1284 */ 1284 */
1285 Future<EditGetAssistsResult> sendEditGetAssists( 1285 Future<EditGetAssistsResult> sendEditGetAssists(
1286 String file, int offset, int length) async { 1286 String file, int offset, int length) async {
1287 var params = new EditGetAssistsParams(file, offset, length).toJson(); 1287 var params = new EditGetAssistsParams(file, offset, length).toJson();
1288 var result = await server.send("edit.getAssists", params); 1288 var result = await server.send("edit.getAssists", params);
1289 ResponseDecoder decoder = new ResponseDecoder(null); 1289 ResponseDecoder decoder = new ResponseDecoder(null);
1290 return new EditGetAssistsResult.fromJson(decoder, 'result', result); 1290 return new EditGetAssistsResult.fromJson(decoder, 'result', result);
1291 } 1291 }
1292 1292
1293 /** 1293 /**
1294 * Get a list of the kinds of refactorings that are valid for the given 1294 * Get a list of the kinds of refactorings that are valid for the given
1295 * selection in the given file. 1295 * selection in the given file.
1296 * 1296 *
1297 * Parameters 1297 * Parameters
1298 * 1298 *
1299 * file (FilePath) 1299 * file: FilePath
1300 * 1300 *
1301 * The file containing the code on which the refactoring would be based. 1301 * The file containing the code on which the refactoring would be based.
1302 * 1302 *
1303 * offset (int) 1303 * offset: int
1304 * 1304 *
1305 * The offset of the code on which the refactoring would be based. 1305 * The offset of the code on which the refactoring would be based.
1306 * 1306 *
1307 * length (int) 1307 * length: int
1308 * 1308 *
1309 * The length of the code on which the refactoring would be based. 1309 * The length of the code on which the refactoring would be based.
1310 * 1310 *
1311 * Returns 1311 * Returns
1312 * 1312 *
1313 * kinds (List<RefactoringKind>) 1313 * kinds: List<RefactoringKind>
1314 * 1314 *
1315 * The kinds of refactorings that are valid for the given selection. 1315 * The kinds of refactorings that are valid for the given selection.
1316 */ 1316 */
1317 Future<EditGetAvailableRefactoringsResult> sendEditGetAvailableRefactorings( 1317 Future<EditGetAvailableRefactoringsResult> sendEditGetAvailableRefactorings(
1318 String file, int offset, int length) async { 1318 String file, int offset, int length) async {
1319 var params = 1319 var params =
1320 new EditGetAvailableRefactoringsParams(file, offset, length).toJson(); 1320 new EditGetAvailableRefactoringsParams(file, offset, length).toJson();
1321 var result = await server.send("edit.getAvailableRefactorings", params); 1321 var result = await server.send("edit.getAvailableRefactorings", params);
1322 ResponseDecoder decoder = new ResponseDecoder(null); 1322 ResponseDecoder decoder = new ResponseDecoder(null);
1323 return new EditGetAvailableRefactoringsResult.fromJson( 1323 return new EditGetAvailableRefactoringsResult.fromJson(
1324 decoder, 'result', result); 1324 decoder, 'result', result);
1325 } 1325 }
1326 1326
1327 /** 1327 /**
1328 * Return the set of fixes that are available for the errors at a given 1328 * Return the set of fixes that are available for the errors at a given
1329 * offset in a given file. 1329 * offset in a given file.
1330 * 1330 *
1331 * Parameters 1331 * Parameters
1332 * 1332 *
1333 * file (FilePath) 1333 * file: FilePath
1334 * 1334 *
1335 * The file containing the errors for which fixes are being requested. 1335 * The file containing the errors for which fixes are being requested.
1336 * 1336 *
1337 * offset (int) 1337 * offset: int
1338 * 1338 *
1339 * The offset used to select the errors for which fixes will be returned. 1339 * The offset used to select the errors for which fixes will be returned.
1340 * 1340 *
1341 * Returns 1341 * Returns
1342 * 1342 *
1343 * fixes (List<AnalysisErrorFixes>) 1343 * fixes: List<AnalysisErrorFixes>
1344 * 1344 *
1345 * The fixes that are available for the errors at the given offset. 1345 * The fixes that are available for the errors at the given offset.
1346 */ 1346 */
1347 Future<EditGetFixesResult> sendEditGetFixes(String file, int offset) async { 1347 Future<EditGetFixesResult> sendEditGetFixes(String file, int offset) async {
1348 var params = new EditGetFixesParams(file, offset).toJson(); 1348 var params = new EditGetFixesParams(file, offset).toJson();
1349 var result = await server.send("edit.getFixes", params); 1349 var result = await server.send("edit.getFixes", params);
1350 ResponseDecoder decoder = new ResponseDecoder(null); 1350 ResponseDecoder decoder = new ResponseDecoder(null);
1351 return new EditGetFixesResult.fromJson(decoder, 'result', result); 1351 return new EditGetFixesResult.fromJson(decoder, 'result', result);
1352 } 1352 }
1353 1353
1354 /** 1354 /**
1355 * Get the changes required to perform a refactoring. 1355 * Get the changes required to perform a refactoring.
1356 * 1356 *
1357 * If another refactoring request is received during the processing of this 1357 * If another refactoring request is received during the processing of this
1358 * one, an error of type REFACTORING_REQUEST_CANCELLED will be generated. 1358 * one, an error of type REFACTORING_REQUEST_CANCELLED will be generated.
1359 * 1359 *
1360 * Parameters 1360 * Parameters
1361 * 1361 *
1362 * kind (RefactoringKind) 1362 * kind: RefactoringKind
1363 * 1363 *
1364 * The kind of refactoring to be performed. 1364 * The kind of refactoring to be performed.
1365 * 1365 *
1366 * file (FilePath) 1366 * file: FilePath
1367 * 1367 *
1368 * The file containing the code involved in the refactoring. 1368 * The file containing the code involved in the refactoring.
1369 * 1369 *
1370 * offset (int) 1370 * offset: int
1371 * 1371 *
1372 * The offset of the region involved in the refactoring. 1372 * The offset of the region involved in the refactoring.
1373 * 1373 *
1374 * length (int) 1374 * length: int
1375 * 1375 *
1376 * The length of the region involved in the refactoring. 1376 * The length of the region involved in the refactoring.
1377 * 1377 *
1378 * validateOnly (bool) 1378 * validateOnly: bool
1379 * 1379 *
1380 * True if the client is only requesting that the values of the options be 1380 * True if the client is only requesting that the values of the options be
1381 * validated and no change be generated. 1381 * validated and no change be generated.
1382 * 1382 *
1383 * options (optional RefactoringOptions) 1383 * options: RefactoringOptions (@optional)
1384 * 1384 *
1385 * Data used to provide values provided by the user. The structure of the 1385 * 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 1386 * data is dependent on the kind of refactoring being performed. The data
1387 * that is expected is documented in the section titled Refactorings, 1387 * that is expected is documented in the section titled Refactorings,
1388 * labeled as "Options". This field can be omitted if the refactoring does 1388 * 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. 1389 * not require any options or if the values of those options are not known.
1390 * 1390 *
1391 * Returns 1391 * Returns
1392 * 1392 *
1393 * initialProblems (List<RefactoringProblem>) 1393 * initialProblems: List<RefactoringProblem>
1394 * 1394 *
1395 * The initial status of the refactoring, i.e. problems related to the 1395 * 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 1396 * context in which the refactoring is requested. The array will be empty
1397 * if there are no known problems. 1397 * if there are no known problems.
1398 * 1398 *
1399 * optionsProblems (List<RefactoringProblem>) 1399 * optionsProblems: List<RefactoringProblem>
1400 * 1400 *
1401 * The options validation status, i.e. problems in the given options, such 1401 * 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 1402 * as light-weight validation of a new name, flags compatibility, etc. The
1403 * array will be empty if there are no known problems. 1403 * array will be empty if there are no known problems.
1404 * 1404 *
1405 * finalProblems (List<RefactoringProblem>) 1405 * finalProblems: List<RefactoringProblem>
1406 * 1406 *
1407 * The final status of the refactoring, i.e. problems identified in the 1407 * The final status of the refactoring, i.e. problems identified in the
1408 * result of a full, potentially expensive validation and / or change 1408 * result of a full, potentially expensive validation and / or change
1409 * creation. The array will be empty if there are no known problems. 1409 * creation. The array will be empty if there are no known problems.
1410 * 1410 *
1411 * feedback (optional RefactoringFeedback) 1411 * feedback: RefactoringFeedback (@optional)
1412 * 1412 *
1413 * Data used to provide feedback to the user. The structure of the data is 1413 * 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 1414 * dependent on the kind of refactoring being created. The data that is
1415 * returned is documented in the section titled Refactorings, labeled as 1415 * returned is documented in the section titled Refactorings, labeled as
1416 * "Feedback". 1416 * "Feedback".
1417 * 1417 *
1418 * change (optional SourceChange) 1418 * change: SourceChange (@optional)
1419 * 1419 *
1420 * The changes that are to be applied to affect the refactoring. This field 1420 * 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 1421 * 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 1422 * being computed, such as having no options specified for a refactoring
1423 * that requires them, or if only validation was requested. 1423 * that requires them, or if only validation was requested.
1424 * 1424 *
1425 * potentialEdits (optional List<String>) 1425 * potentialEdits: List<String> (@optional)
1426 * 1426 *
1427 * The ids of source edits that are not known to be valid. An edit is not 1427 * 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 1428 * 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 1429 * 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 1430 * 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 1431 * 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 1432 * if the change field is omitted or if there are no potential edits for
1433 * the refactoring. 1433 * the refactoring.
1434 */ 1434 */
1435 Future<EditGetRefactoringResult> sendEditGetRefactoring(RefactoringKind kind, 1435 Future<EditGetRefactoringResult> sendEditGetRefactoring(RefactoringKind kind,
(...skipping 12 matching lines...) Expand all
1448 * Get the changes required to convert the partial statement at the given 1448 * Get the changes required to convert the partial statement at the given
1449 * location into a syntactically valid statement. If the current statement is 1449 * location into a syntactically valid statement. If the current statement is
1450 * already valid the change will insert a newline plus appropriate 1450 * 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 1451 * 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 1452 * makes the statement valid cannot be determined (perhaps because it has not
1453 * yet been implemented) the statement will be considered already valid and 1453 * yet been implemented) the statement will be considered already valid and
1454 * the appropriate change returned. 1454 * the appropriate change returned.
1455 * 1455 *
1456 * Parameters 1456 * Parameters
1457 * 1457 *
1458 * file (FilePath) 1458 * file: FilePath
1459 * 1459 *
1460 * The file containing the statement to be completed. 1460 * The file containing the statement to be completed.
1461 * 1461 *
1462 * offset (int) 1462 * offset: int
1463 * 1463 *
1464 * The offset used to identify the statement to be completed. 1464 * The offset used to identify the statement to be completed.
1465 * 1465 *
1466 * Returns 1466 * Returns
1467 * 1467 *
1468 * change (SourceChange) 1468 * change: SourceChange
1469 * 1469 *
1470 * The change to be applied in order to complete the statement. 1470 * The change to be applied in order to complete the statement.
1471 * 1471 *
1472 * whitespaceOnly (bool) 1472 * whitespaceOnly: bool
1473 * 1473 *
1474 * Will be true if the change contains nothing but whitespace characters, 1474 * Will be true if the change contains nothing but whitespace characters,
1475 * or is empty. 1475 * or is empty.
1476 */ 1476 */
1477 Future<EditGetStatementCompletionResult> sendEditGetStatementCompletion( 1477 Future<EditGetStatementCompletionResult> sendEditGetStatementCompletion(
1478 String file, int offset) async { 1478 String file, int offset) async {
1479 var params = new EditGetStatementCompletionParams(file, offset).toJson(); 1479 var params = new EditGetStatementCompletionParams(file, offset).toJson();
1480 var result = await server.send("edit.getStatementCompletion", params); 1480 var result = await server.send("edit.getStatementCompletion", params);
1481 ResponseDecoder decoder = new ResponseDecoder(null); 1481 ResponseDecoder decoder = new ResponseDecoder(null);
1482 return new EditGetStatementCompletionResult.fromJson( 1482 return new EditGetStatementCompletionResult.fromJson(
1483 decoder, 'result', result); 1483 decoder, 'result', result);
1484 } 1484 }
1485 1485
1486 /** 1486 /**
1487 * Sort all of the directives, unit and class members of the given Dart file. 1487 * Sort all of the directives, unit and class members of the given Dart file.
1488 * 1488 *
1489 * If a request is made for a file that does not exist, does not belong to an 1489 * 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 1490 * analysis root or is not a Dart file, SORT_MEMBERS_INVALID_FILE will be
1491 * generated. 1491 * generated.
1492 * 1492 *
1493 * If the Dart file has scan or parse errors, SORT_MEMBERS_PARSE_ERRORS will 1493 * If the Dart file has scan or parse errors, SORT_MEMBERS_PARSE_ERRORS will
1494 * be generated. 1494 * be generated.
1495 * 1495 *
1496 * Parameters 1496 * Parameters
1497 * 1497 *
1498 * file (FilePath) 1498 * file: FilePath
1499 * 1499 *
1500 * The Dart file to sort. 1500 * The Dart file to sort.
1501 * 1501 *
1502 * Returns 1502 * Returns
1503 * 1503 *
1504 * edit (SourceFileEdit) 1504 * edit: SourceFileEdit
1505 * 1505 *
1506 * The file edit that is to be applied to the given file to effect the 1506 * The file edit that is to be applied to the given file to effect the
1507 * sorting. 1507 * sorting.
1508 */ 1508 */
1509 Future<EditSortMembersResult> sendEditSortMembers(String file) async { 1509 Future<EditSortMembersResult> sendEditSortMembers(String file) async {
1510 var params = new EditSortMembersParams(file).toJson(); 1510 var params = new EditSortMembersParams(file).toJson();
1511 var result = await server.send("edit.sortMembers", params); 1511 var result = await server.send("edit.sortMembers", params);
1512 ResponseDecoder decoder = new ResponseDecoder(null); 1512 ResponseDecoder decoder = new ResponseDecoder(null);
1513 return new EditSortMembersResult.fromJson(decoder, 'result', result); 1513 return new EditSortMembersResult.fromJson(decoder, 'result', result);
1514 } 1514 }
1515 1515
1516 /** 1516 /**
1517 * Organizes all of the directives - removes unused imports and sorts 1517 * Organizes all of the directives - removes unused imports and sorts
1518 * directives of the given Dart file according to the Dart Style Guide. 1518 * directives of the given Dart file according to the Dart Style Guide.
1519 * 1519 *
1520 * If a request is made for a file that does not exist, does not belong to an 1520 * 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. 1521 * analysis root or is not a Dart file, FILE_NOT_ANALYZED will be generated.
1522 * 1522 *
1523 * If directives of the Dart file cannot be organized, for example because it 1523 * 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 1524 * has scan or parse errors, or by other reasons, ORGANIZE_DIRECTIVES_ERROR
1525 * will be generated. The message will provide details about the reason. 1525 * will be generated. The message will provide details about the reason.
1526 * 1526 *
1527 * Parameters 1527 * Parameters
1528 * 1528 *
1529 * file (FilePath) 1529 * file: FilePath
1530 * 1530 *
1531 * The Dart file to organize directives in. 1531 * The Dart file to organize directives in.
1532 * 1532 *
1533 * Returns 1533 * Returns
1534 * 1534 *
1535 * edit (SourceFileEdit) 1535 * edit: SourceFileEdit
1536 * 1536 *
1537 * The file edit that is to be applied to the given file to effect the 1537 * The file edit that is to be applied to the given file to effect the
1538 * organizing. 1538 * organizing.
1539 */ 1539 */
1540 Future<EditOrganizeDirectivesResult> sendEditOrganizeDirectives( 1540 Future<EditOrganizeDirectivesResult> sendEditOrganizeDirectives(
1541 String file) async { 1541 String file) async {
1542 var params = new EditOrganizeDirectivesParams(file).toJson(); 1542 var params = new EditOrganizeDirectivesParams(file).toJson();
1543 var result = await server.send("edit.organizeDirectives", params); 1543 var result = await server.send("edit.organizeDirectives", params);
1544 ResponseDecoder decoder = new ResponseDecoder(null); 1544 ResponseDecoder decoder = new ResponseDecoder(null);
1545 return new EditOrganizeDirectivesResult.fromJson(decoder, 'result', result); 1545 return new EditOrganizeDirectivesResult.fromJson(decoder, 'result', result);
1546 } 1546 }
1547 1547
1548 /** 1548 /**
1549 * Create an execution context for the executable file with the given path. 1549 * Create an execution context for the executable file with the given path.
1550 * The context that is created will persist until execution.deleteContext is 1550 * The context that is created will persist until execution.deleteContext is
1551 * used to delete it. Clients, therefore, are responsible for managing the 1551 * used to delete it. Clients, therefore, are responsible for managing the
1552 * lifetime of execution contexts. 1552 * lifetime of execution contexts.
1553 * 1553 *
1554 * Parameters 1554 * Parameters
1555 * 1555 *
1556 * contextRoot (FilePath) 1556 * contextRoot: FilePath
1557 * 1557 *
1558 * The path of the Dart or HTML file that will be launched, or the path of 1558 * The path of the Dart or HTML file that will be launched, or the path of
1559 * the directory containing the file. 1559 * the directory containing the file.
1560 * 1560 *
1561 * Returns 1561 * Returns
1562 * 1562 *
1563 * id (ExecutionContextId) 1563 * id: ExecutionContextId
1564 * 1564 *
1565 * The identifier used to refer to the execution context that was created. 1565 * The identifier used to refer to the execution context that was created.
1566 */ 1566 */
1567 Future<ExecutionCreateContextResult> sendExecutionCreateContext( 1567 Future<ExecutionCreateContextResult> sendExecutionCreateContext(
1568 String contextRoot) async { 1568 String contextRoot) async {
1569 var params = new ExecutionCreateContextParams(contextRoot).toJson(); 1569 var params = new ExecutionCreateContextParams(contextRoot).toJson();
1570 var result = await server.send("execution.createContext", params); 1570 var result = await server.send("execution.createContext", params);
1571 ResponseDecoder decoder = new ResponseDecoder(null); 1571 ResponseDecoder decoder = new ResponseDecoder(null);
1572 return new ExecutionCreateContextResult.fromJson(decoder, 'result', result); 1572 return new ExecutionCreateContextResult.fromJson(decoder, 'result', result);
1573 } 1573 }
1574 1574
1575 /** 1575 /**
1576 * Delete the execution context with the given identifier. The context id is 1576 * 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 1577 * no longer valid after this command. The server is allowed to re-use ids
1578 * when they are no longer valid. 1578 * when they are no longer valid.
1579 * 1579 *
1580 * Parameters 1580 * Parameters
1581 * 1581 *
1582 * id (ExecutionContextId) 1582 * id: ExecutionContextId
1583 * 1583 *
1584 * The identifier of the execution context that is to be deleted. 1584 * The identifier of the execution context that is to be deleted.
1585 */ 1585 */
1586 Future sendExecutionDeleteContext(String id) async { 1586 Future sendExecutionDeleteContext(String id) async {
1587 var params = new ExecutionDeleteContextParams(id).toJson(); 1587 var params = new ExecutionDeleteContextParams(id).toJson();
1588 var result = await server.send("execution.deleteContext", params); 1588 var result = await server.send("execution.deleteContext", params);
1589 outOfTestExpect(result, isNull); 1589 outOfTestExpect(result, isNull);
1590 return null; 1590 return null;
1591 } 1591 }
1592 1592
(...skipping 13 matching lines...) Expand all
1606 * If the uri field is provided and the value is not a valid URI or if the 1606 * 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 1607 * 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 1608 * exist or something other than a file), then an error of type
1609 * INVALID_PARAMETER will be generated. 1609 * INVALID_PARAMETER will be generated.
1610 * 1610 *
1611 * If the contextRoot used to create the execution context does not exist, 1611 * If the contextRoot used to create the execution context does not exist,
1612 * then an error of type INVALID_EXECUTION_CONTEXT will be generated. 1612 * then an error of type INVALID_EXECUTION_CONTEXT will be generated.
1613 * 1613 *
1614 * Parameters 1614 * Parameters
1615 * 1615 *
1616 * id (ExecutionContextId) 1616 * id: ExecutionContextId
1617 * 1617 *
1618 * The identifier of the execution context in which the URI is to be 1618 * The identifier of the execution context in which the URI is to be
1619 * mapped. 1619 * mapped.
1620 * 1620 *
1621 * file (optional FilePath) 1621 * file: FilePath (@optional)
1622 * 1622 *
1623 * The path of the file to be mapped into a URI. 1623 * The path of the file to be mapped into a URI.
1624 * 1624 *
1625 * uri (optional String) 1625 * uri: String (@optional)
1626 * 1626 *
1627 * The URI to be mapped into a file path. 1627 * The URI to be mapped into a file path.
1628 * 1628 *
1629 * Returns 1629 * Returns
1630 * 1630 *
1631 * file (optional FilePath) 1631 * file: FilePath (@optional)
1632 * 1632 *
1633 * The file to which the URI was mapped. This field is omitted if the uri 1633 * The file to which the URI was mapped. This field is omitted if the uri
1634 * field was not given in the request. 1634 * field was not given in the request.
1635 * 1635 *
1636 * uri (optional String) 1636 * uri: String (@optional)
1637 * 1637 *
1638 * The URI to which the file path was mapped. This field is omitted if the 1638 * The URI to which the file path was mapped. This field is omitted if the
1639 * file field was not given in the request. 1639 * file field was not given in the request.
1640 */ 1640 */
1641 Future<ExecutionMapUriResult> sendExecutionMapUri(String id, 1641 Future<ExecutionMapUriResult> sendExecutionMapUri(String id,
1642 {String file, String uri}) async { 1642 {String file, String uri}) async {
1643 var params = new ExecutionMapUriParams(id, file: file, uri: uri).toJson(); 1643 var params = new ExecutionMapUriParams(id, file: file, uri: uri).toJson();
1644 var result = await server.send("execution.mapUri", params); 1644 var result = await server.send("execution.mapUri", params);
1645 ResponseDecoder decoder = new ResponseDecoder(null); 1645 ResponseDecoder decoder = new ResponseDecoder(null);
1646 return new ExecutionMapUriResult.fromJson(decoder, 'result', result); 1646 return new ExecutionMapUriResult.fromJson(decoder, 'result', result);
1647 } 1647 }
1648 1648
1649 /** 1649 /**
1650 * Deprecated: the analysis server no longer fires LAUNCH_DATA events. 1650 * @deprecated: the analysis server no longer fires LAUNCH_DATA events.
1651 * 1651 *
1652 * Subscribe for services. All previous subscriptions are replaced by the 1652 * Subscribe for services. All previous subscriptions are replaced by the
1653 * given set of services. 1653 * given set of services.
1654 * 1654 *
1655 * It is an error if any of the elements in the list are not valid services. 1655 * 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 1656 * If there is an error, then the current subscriptions will remain
1657 * unchanged. 1657 * unchanged.
1658 * 1658 *
1659 * Parameters 1659 * Parameters
1660 * 1660 *
1661 * subscriptions (List<ExecutionService>) 1661 * subscriptions: List<ExecutionService>
1662 * 1662 *
1663 * A list of the services being subscribed to. 1663 * A list of the services being subscribed to.
1664 */ 1664 */
1665 Future sendExecutionSetSubscriptions( 1665 Future sendExecutionSetSubscriptions(
1666 List<ExecutionService> subscriptions) async { 1666 List<ExecutionService> subscriptions) async {
1667 var params = new ExecutionSetSubscriptionsParams(subscriptions).toJson(); 1667 var params = new ExecutionSetSubscriptionsParams(subscriptions).toJson();
1668 var result = await server.send("execution.setSubscriptions", params); 1668 var result = await server.send("execution.setSubscriptions", params);
1669 outOfTestExpect(result, isNull); 1669 outOfTestExpect(result, isNull);
1670 return null; 1670 return null;
1671 } 1671 }
1672 1672
1673 /** 1673 /**
1674 * Reports information needed to allow a single file to be launched. 1674 * Reports information needed to allow a single file to be launched.
1675 * 1675 *
1676 * This notification is not subscribed to by default. Clients can subscribe 1676 * 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 1677 * by including the value "LAUNCH_DATA" in the list of services passed in an
1678 * execution.setSubscriptions request. 1678 * execution.setSubscriptions request.
1679 * 1679 *
1680 * Parameters 1680 * Parameters
1681 * 1681 *
1682 * file (FilePath) 1682 * file: FilePath
1683 * 1683 *
1684 * The file for which launch data is being provided. This will either be a 1684 * The file for which launch data is being provided. This will either be a
1685 * Dart library or an HTML file. 1685 * Dart library or an HTML file.
1686 * 1686 *
1687 * kind (optional ExecutableKind) 1687 * kind: ExecutableKind (@optional)
1688 * 1688 *
1689 * The kind of the executable file. This field is omitted if the file is 1689 * The kind of the executable file. This field is omitted if the file is
1690 * not a Dart file. 1690 * not a Dart file.
1691 * 1691 *
1692 * referencedFiles (optional List<FilePath>) 1692 * referencedFiles: List<FilePath> (@optional)
1693 * 1693 *
1694 * A list of the Dart files that are referenced by the file. This field is 1694 * 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. 1695 * omitted if the file is not an HTML file.
1696 */ 1696 */
1697 Stream<ExecutionLaunchDataParams> onExecutionLaunchData; 1697 Stream<ExecutionLaunchDataParams> onExecutionLaunchData;
1698 1698
1699 /** 1699 /**
1700 * Stream controller for [onExecutionLaunchData]. 1700 * Stream controller for [onExecutionLaunchData].
1701 */ 1701 */
1702 StreamController<ExecutionLaunchDataParams> _onExecutionLaunchData; 1702 StreamController<ExecutionLaunchDataParams> _onExecutionLaunchData;
1703 1703
1704 /** 1704 /**
1705 * Return server diagnostics. 1705 * Return server diagnostics.
1706 * 1706 *
1707 * Returns 1707 * Returns
1708 * 1708 *
1709 * contexts (List<ContextData>) 1709 * contexts: List<ContextData>
1710 * 1710 *
1711 * The list of analysis contexts. 1711 * The list of analysis contexts.
1712 */ 1712 */
1713 Future<DiagnosticGetDiagnosticsResult> sendDiagnosticGetDiagnostics() async { 1713 Future<DiagnosticGetDiagnosticsResult> sendDiagnosticGetDiagnostics() async {
1714 var result = await server.send("diagnostic.getDiagnostics", null); 1714 var result = await server.send("diagnostic.getDiagnostics", null);
1715 ResponseDecoder decoder = new ResponseDecoder(null); 1715 ResponseDecoder decoder = new ResponseDecoder(null);
1716 return new DiagnosticGetDiagnosticsResult.fromJson( 1716 return new DiagnosticGetDiagnosticsResult.fromJson(
1717 decoder, 'result', result); 1717 decoder, 'result', result);
1718 } 1718 }
1719 1719
1720 /** 1720 /**
1721 * Return the port of the diagnostic web server. If the server is not running 1721 * 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 1722 * 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. 1723 * server, this call will return an error of DEBUG_PORT_COULD_NOT_BE_OPENED.
1724 * 1724 *
1725 * Returns 1725 * Returns
1726 * 1726 *
1727 * port (int) 1727 * port: int
1728 * 1728 *
1729 * The diagnostic server port. 1729 * The diagnostic server port.
1730 */ 1730 */
1731 Future<DiagnosticGetServerPortResult> sendDiagnosticGetServerPort() async { 1731 Future<DiagnosticGetServerPortResult> sendDiagnosticGetServerPort() async {
1732 var result = await server.send("diagnostic.getServerPort", null); 1732 var result = await server.send("diagnostic.getServerPort", null);
1733 ResponseDecoder decoder = new ResponseDecoder(null); 1733 ResponseDecoder decoder = new ResponseDecoder(null);
1734 return new DiagnosticGetServerPortResult.fromJson( 1734 return new DiagnosticGetServerPortResult.fromJson(
1735 decoder, 'result', result); 1735 decoder, 'result', result);
1736 } 1736 }
1737 1737
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1881 outOfTestExpect(params, isExecutionLaunchDataParams); 1881 outOfTestExpect(params, isExecutionLaunchDataParams);
1882 _onExecutionLaunchData.add( 1882 _onExecutionLaunchData.add(
1883 new ExecutionLaunchDataParams.fromJson(decoder, 'params', params)); 1883 new ExecutionLaunchDataParams.fromJson(decoder, 'params', params));
1884 break; 1884 break;
1885 default: 1885 default:
1886 fail('Unexpected notification: $event'); 1886 fail('Unexpected notification: $event');
1887 break; 1887 break;
1888 } 1888 }
1889 } 1889 }
1890 } 1890 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698