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

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

Issue 475143003: Fix code generated matchers to handle recursive objects. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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/spec/generate_files". 7 // "pkg/analysis_server/spec/generate_files".
8 8
9 /** 9 /**
10 * Matchers for data types defined in the analysis server API 10 * Matchers for data types defined in the analysis server API
(...skipping 10 matching lines...) Expand all
21 */ 21 */
22 final Matcher isServerGetVersionParams = isNull; 22 final Matcher isServerGetVersionParams = isNull;
23 23
24 /** 24 /**
25 * server.getVersion result 25 * server.getVersion result
26 * 26 *
27 * { 27 * {
28 * "version": String 28 * "version": String
29 * } 29 * }
30 */ 30 */
31 final Matcher isServerGetVersionResult = new MatchesJsonObject( 31 final Matcher isServerGetVersionResult = new LazyMatcher(() => new MatchesJsonOb ject(
32 "server.getVersion result", { 32 "server.getVersion result", {
33 "version": isString 33 "version": isString
34 }); 34 }));
35 35
36 /** 36 /**
37 * server.shutdown params 37 * server.shutdown params
38 */ 38 */
39 final Matcher isServerShutdownParams = isNull; 39 final Matcher isServerShutdownParams = isNull;
40 40
41 /** 41 /**
42 * server.shutdown result 42 * server.shutdown result
43 */ 43 */
44 final Matcher isServerShutdownResult = isNull; 44 final Matcher isServerShutdownResult = isNull;
45 45
46 /** 46 /**
47 * server.setSubscriptions params 47 * server.setSubscriptions params
48 * 48 *
49 * { 49 * {
50 * "subscriptions": List<ServerService> 50 * "subscriptions": List<ServerService>
51 * } 51 * }
52 */ 52 */
53 final Matcher isServerSetSubscriptionsParams = new MatchesJsonObject( 53 final Matcher isServerSetSubscriptionsParams = new LazyMatcher(() => new Matches JsonObject(
54 "server.setSubscriptions params", { 54 "server.setSubscriptions params", {
55 "subscriptions": isListOf(isServerService) 55 "subscriptions": isListOf(isServerService)
56 }); 56 }));
57 57
58 /** 58 /**
59 * server.setSubscriptions result 59 * server.setSubscriptions result
60 */ 60 */
61 final Matcher isServerSetSubscriptionsResult = isNull; 61 final Matcher isServerSetSubscriptionsResult = isNull;
62 62
63 /** 63 /**
64 * server.connected params 64 * server.connected params
65 */ 65 */
66 final Matcher isServerConnectedParams = isNull; 66 final Matcher isServerConnectedParams = isNull;
67 67
68 /** 68 /**
69 * server.error params 69 * server.error params
70 * 70 *
71 * { 71 * {
72 * "fatal": bool 72 * "fatal": bool
73 * "message": String 73 * "message": String
74 * "stackTrace": String 74 * "stackTrace": String
75 * } 75 * }
76 */ 76 */
77 final Matcher isServerErrorParams = new MatchesJsonObject( 77 final Matcher isServerErrorParams = new LazyMatcher(() => new MatchesJsonObject(
78 "server.error params", { 78 "server.error params", {
79 "fatal": isBool, 79 "fatal": isBool,
80 "message": isString, 80 "message": isString,
81 "stackTrace": isString 81 "stackTrace": isString
82 }); 82 }));
83 83
84 /** 84 /**
85 * server.status params 85 * server.status params
86 * 86 *
87 * { 87 * {
88 * "analysis": optional AnalysisStatus 88 * "analysis": optional AnalysisStatus
89 * } 89 * }
90 */ 90 */
91 final Matcher isServerStatusParams = new MatchesJsonObject( 91 final Matcher isServerStatusParams = new LazyMatcher(() => new MatchesJsonObject (
92 "server.status params", null, optionalFields: { 92 "server.status params", null, optionalFields: {
93 "analysis": isAnalysisStatus 93 "analysis": isAnalysisStatus
94 }); 94 }));
95 95
96 /** 96 /**
97 * analysis.getErrors params 97 * analysis.getErrors params
98 * 98 *
99 * { 99 * {
100 * "file": FilePath 100 * "file": FilePath
101 * } 101 * }
102 */ 102 */
103 final Matcher isAnalysisGetErrorsParams = new MatchesJsonObject( 103 final Matcher isAnalysisGetErrorsParams = new LazyMatcher(() => new MatchesJsonO bject(
104 "analysis.getErrors params", { 104 "analysis.getErrors params", {
105 "file": isFilePath 105 "file": isFilePath
106 }); 106 }));
107 107
108 /** 108 /**
109 * analysis.getErrors result 109 * analysis.getErrors result
110 * 110 *
111 * { 111 * {
112 * "errors": List<AnalysisError> 112 * "errors": List<AnalysisError>
113 * } 113 * }
114 */ 114 */
115 final Matcher isAnalysisGetErrorsResult = new MatchesJsonObject( 115 final Matcher isAnalysisGetErrorsResult = new LazyMatcher(() => new MatchesJsonO bject(
116 "analysis.getErrors result", { 116 "analysis.getErrors result", {
117 "errors": isListOf(isAnalysisError) 117 "errors": isListOf(isAnalysisError)
118 }); 118 }));
119 119
120 /** 120 /**
121 * analysis.getHover params 121 * analysis.getHover params
122 * 122 *
123 * { 123 * {
124 * "file": FilePath 124 * "file": FilePath
125 * "offset": int 125 * "offset": int
126 * } 126 * }
127 */ 127 */
128 final Matcher isAnalysisGetHoverParams = new MatchesJsonObject( 128 final Matcher isAnalysisGetHoverParams = new LazyMatcher(() => new MatchesJsonOb ject(
129 "analysis.getHover params", { 129 "analysis.getHover params", {
130 "file": isFilePath, 130 "file": isFilePath,
131 "offset": isInt 131 "offset": isInt
132 }); 132 }));
133 133
134 /** 134 /**
135 * analysis.getHover result 135 * analysis.getHover result
136 * 136 *
137 * { 137 * {
138 * "hovers": List<HoverInformation> 138 * "hovers": List<HoverInformation>
139 * } 139 * }
140 */ 140 */
141 final Matcher isAnalysisGetHoverResult = new MatchesJsonObject( 141 final Matcher isAnalysisGetHoverResult = new LazyMatcher(() => new MatchesJsonOb ject(
142 "analysis.getHover result", { 142 "analysis.getHover result", {
143 "hovers": isListOf(isHoverInformation) 143 "hovers": isListOf(isHoverInformation)
144 }); 144 }));
145 145
146 /** 146 /**
147 * analysis.reanalyze params 147 * analysis.reanalyze params
148 */ 148 */
149 final Matcher isAnalysisReanalyzeParams = isNull; 149 final Matcher isAnalysisReanalyzeParams = isNull;
150 150
151 /** 151 /**
152 * analysis.reanalyze result 152 * analysis.reanalyze result
153 */ 153 */
154 final Matcher isAnalysisReanalyzeResult = isNull; 154 final Matcher isAnalysisReanalyzeResult = isNull;
155 155
156 /** 156 /**
157 * analysis.setAnalysisRoots params 157 * analysis.setAnalysisRoots params
158 * 158 *
159 * { 159 * {
160 * "included": List<FilePath> 160 * "included": List<FilePath>
161 * "excluded": List<FilePath> 161 * "excluded": List<FilePath>
162 * } 162 * }
163 */ 163 */
164 final Matcher isAnalysisSetAnalysisRootsParams = new MatchesJsonObject( 164 final Matcher isAnalysisSetAnalysisRootsParams = new LazyMatcher(() => new Match esJsonObject(
165 "analysis.setAnalysisRoots params", { 165 "analysis.setAnalysisRoots params", {
166 "included": isListOf(isFilePath), 166 "included": isListOf(isFilePath),
167 "excluded": isListOf(isFilePath) 167 "excluded": isListOf(isFilePath)
168 }); 168 }));
169 169
170 /** 170 /**
171 * analysis.setAnalysisRoots result 171 * analysis.setAnalysisRoots result
172 */ 172 */
173 final Matcher isAnalysisSetAnalysisRootsResult = isNull; 173 final Matcher isAnalysisSetAnalysisRootsResult = isNull;
174 174
175 /** 175 /**
176 * analysis.setPriorityFiles params 176 * analysis.setPriorityFiles params
177 * 177 *
178 * { 178 * {
179 * "files": List<FilePath> 179 * "files": List<FilePath>
180 * } 180 * }
181 */ 181 */
182 final Matcher isAnalysisSetPriorityFilesParams = new MatchesJsonObject( 182 final Matcher isAnalysisSetPriorityFilesParams = new LazyMatcher(() => new Match esJsonObject(
183 "analysis.setPriorityFiles params", { 183 "analysis.setPriorityFiles params", {
184 "files": isListOf(isFilePath) 184 "files": isListOf(isFilePath)
185 }); 185 }));
186 186
187 /** 187 /**
188 * analysis.setPriorityFiles result 188 * analysis.setPriorityFiles result
189 */ 189 */
190 final Matcher isAnalysisSetPriorityFilesResult = isNull; 190 final Matcher isAnalysisSetPriorityFilesResult = isNull;
191 191
192 /** 192 /**
193 * analysis.setSubscriptions params 193 * analysis.setSubscriptions params
194 * 194 *
195 * { 195 * {
196 * "subscriptions": Map<AnalysisService, List<FilePath>> 196 * "subscriptions": Map<AnalysisService, List<FilePath>>
197 * } 197 * }
198 */ 198 */
199 final Matcher isAnalysisSetSubscriptionsParams = new MatchesJsonObject( 199 final Matcher isAnalysisSetSubscriptionsParams = new LazyMatcher(() => new Match esJsonObject(
200 "analysis.setSubscriptions params", { 200 "analysis.setSubscriptions params", {
201 "subscriptions": isMapOf(isAnalysisService, isListOf(isFilePath)) 201 "subscriptions": isMapOf(isAnalysisService, isListOf(isFilePath))
202 }); 202 }));
203 203
204 /** 204 /**
205 * analysis.setSubscriptions result 205 * analysis.setSubscriptions result
206 */ 206 */
207 final Matcher isAnalysisSetSubscriptionsResult = isNull; 207 final Matcher isAnalysisSetSubscriptionsResult = isNull;
208 208
209 /** 209 /**
210 * analysis.updateContent params 210 * analysis.updateContent params
211 * 211 *
212 * { 212 * {
213 * "files": Map<FilePath, AddContentOverlay | ChangeContentOverlay | RemoveCon tentOverlay> 213 * "files": Map<FilePath, AddContentOverlay | ChangeContentOverlay | RemoveCon tentOverlay>
214 * } 214 * }
215 */ 215 */
216 final Matcher isAnalysisUpdateContentParams = new MatchesJsonObject( 216 final Matcher isAnalysisUpdateContentParams = new LazyMatcher(() => new MatchesJ sonObject(
217 "analysis.updateContent params", { 217 "analysis.updateContent params", {
218 "files": isMapOf(isFilePath, isOneOf([isAddContentOverlay, isChangeContentOv erlay, isRemoveContentOverlay])) 218 "files": isMapOf(isFilePath, isOneOf([isAddContentOverlay, isChangeContentOv erlay, isRemoveContentOverlay]))
219 }); 219 }));
220 220
221 /** 221 /**
222 * analysis.updateContent result 222 * analysis.updateContent result
223 */ 223 */
224 final Matcher isAnalysisUpdateContentResult = isNull; 224 final Matcher isAnalysisUpdateContentResult = isNull;
225 225
226 /** 226 /**
227 * analysis.updateOptions params 227 * analysis.updateOptions params
228 * 228 *
229 * { 229 * {
230 * "options": AnalysisOptions 230 * "options": AnalysisOptions
231 * } 231 * }
232 */ 232 */
233 final Matcher isAnalysisUpdateOptionsParams = new MatchesJsonObject( 233 final Matcher isAnalysisUpdateOptionsParams = new LazyMatcher(() => new MatchesJ sonObject(
234 "analysis.updateOptions params", { 234 "analysis.updateOptions params", {
235 "options": isAnalysisOptions 235 "options": isAnalysisOptions
236 }); 236 }));
237 237
238 /** 238 /**
239 * analysis.updateOptions result 239 * analysis.updateOptions result
240 */ 240 */
241 final Matcher isAnalysisUpdateOptionsResult = isNull; 241 final Matcher isAnalysisUpdateOptionsResult = isNull;
242 242
243 /** 243 /**
244 * analysis.errors params 244 * analysis.errors params
245 * 245 *
246 * { 246 * {
247 * "file": FilePath 247 * "file": FilePath
248 * "errors": List<AnalysisError> 248 * "errors": List<AnalysisError>
249 * } 249 * }
250 */ 250 */
251 final Matcher isAnalysisErrorsParams = new MatchesJsonObject( 251 final Matcher isAnalysisErrorsParams = new LazyMatcher(() => new MatchesJsonObje ct(
252 "analysis.errors params", { 252 "analysis.errors params", {
253 "file": isFilePath, 253 "file": isFilePath,
254 "errors": isListOf(isAnalysisError) 254 "errors": isListOf(isAnalysisError)
255 }); 255 }));
256 256
257 /** 257 /**
258 * analysis.flushResults params 258 * analysis.flushResults params
259 * 259 *
260 * { 260 * {
261 * "files": List<FilePath> 261 * "files": List<FilePath>
262 * } 262 * }
263 */ 263 */
264 final Matcher isAnalysisFlushResultsParams = new MatchesJsonObject( 264 final Matcher isAnalysisFlushResultsParams = new LazyMatcher(() => new MatchesJs onObject(
265 "analysis.flushResults params", { 265 "analysis.flushResults params", {
266 "files": isListOf(isFilePath) 266 "files": isListOf(isFilePath)
267 }); 267 }));
268 268
269 /** 269 /**
270 * analysis.folding params 270 * analysis.folding params
271 * 271 *
272 * { 272 * {
273 * "file": FilePath 273 * "file": FilePath
274 * "regions": List<FoldingRegion> 274 * "regions": List<FoldingRegion>
275 * } 275 * }
276 */ 276 */
277 final Matcher isAnalysisFoldingParams = new MatchesJsonObject( 277 final Matcher isAnalysisFoldingParams = new LazyMatcher(() => new MatchesJsonObj ect(
278 "analysis.folding params", { 278 "analysis.folding params", {
279 "file": isFilePath, 279 "file": isFilePath,
280 "regions": isListOf(isFoldingRegion) 280 "regions": isListOf(isFoldingRegion)
281 }); 281 }));
282 282
283 /** 283 /**
284 * analysis.highlights params 284 * analysis.highlights params
285 * 285 *
286 * { 286 * {
287 * "file": FilePath 287 * "file": FilePath
288 * "regions": List<HighlightRegion> 288 * "regions": List<HighlightRegion>
289 * } 289 * }
290 */ 290 */
291 final Matcher isAnalysisHighlightsParams = new MatchesJsonObject( 291 final Matcher isAnalysisHighlightsParams = new LazyMatcher(() => new MatchesJson Object(
292 "analysis.highlights params", { 292 "analysis.highlights params", {
293 "file": isFilePath, 293 "file": isFilePath,
294 "regions": isListOf(isHighlightRegion) 294 "regions": isListOf(isHighlightRegion)
295 }); 295 }));
296 296
297 /** 297 /**
298 * analysis.navigation params 298 * analysis.navigation params
299 * 299 *
300 * { 300 * {
301 * "file": FilePath 301 * "file": FilePath
302 * "regions": List<NavigationRegion> 302 * "regions": List<NavigationRegion>
303 * } 303 * }
304 */ 304 */
305 final Matcher isAnalysisNavigationParams = new MatchesJsonObject( 305 final Matcher isAnalysisNavigationParams = new LazyMatcher(() => new MatchesJson Object(
306 "analysis.navigation params", { 306 "analysis.navigation params", {
307 "file": isFilePath, 307 "file": isFilePath,
308 "regions": isListOf(isNavigationRegion) 308 "regions": isListOf(isNavigationRegion)
309 }); 309 }));
310 310
311 /** 311 /**
312 * analysis.occurrences params 312 * analysis.occurrences params
313 * 313 *
314 * { 314 * {
315 * "file": FilePath 315 * "file": FilePath
316 * "occurrences": List<Occurrences> 316 * "occurrences": List<Occurrences>
317 * } 317 * }
318 */ 318 */
319 final Matcher isAnalysisOccurrencesParams = new MatchesJsonObject( 319 final Matcher isAnalysisOccurrencesParams = new LazyMatcher(() => new MatchesJso nObject(
320 "analysis.occurrences params", { 320 "analysis.occurrences params", {
321 "file": isFilePath, 321 "file": isFilePath,
322 "occurrences": isListOf(isOccurrences) 322 "occurrences": isListOf(isOccurrences)
323 }); 323 }));
324 324
325 /** 325 /**
326 * analysis.outline params 326 * analysis.outline params
327 * 327 *
328 * { 328 * {
329 * "file": FilePath 329 * "file": FilePath
330 * "outline": Outline 330 * "outline": Outline
331 * } 331 * }
332 */ 332 */
333 final Matcher isAnalysisOutlineParams = new MatchesJsonObject( 333 final Matcher isAnalysisOutlineParams = new LazyMatcher(() => new MatchesJsonObj ect(
334 "analysis.outline params", { 334 "analysis.outline params", {
335 "file": isFilePath, 335 "file": isFilePath,
336 "outline": isOutline 336 "outline": isOutline
337 }); 337 }));
338 338
339 /** 339 /**
340 * analysis.overrides params 340 * analysis.overrides params
341 * 341 *
342 * { 342 * {
343 * "file": FilePath 343 * "file": FilePath
344 * "overrides": List<Override> 344 * "overrides": List<Override>
345 * } 345 * }
346 */ 346 */
347 final Matcher isAnalysisOverridesParams = new MatchesJsonObject( 347 final Matcher isAnalysisOverridesParams = new LazyMatcher(() => new MatchesJsonO bject(
348 "analysis.overrides params", { 348 "analysis.overrides params", {
349 "file": isFilePath, 349 "file": isFilePath,
350 "overrides": isListOf(isOverride) 350 "overrides": isListOf(isOverride)
351 }); 351 }));
352 352
353 /** 353 /**
354 * completion.getSuggestions params 354 * completion.getSuggestions params
355 * 355 *
356 * { 356 * {
357 * "file": FilePath 357 * "file": FilePath
358 * "offset": int 358 * "offset": int
359 * } 359 * }
360 */ 360 */
361 final Matcher isCompletionGetSuggestionsParams = new MatchesJsonObject( 361 final Matcher isCompletionGetSuggestionsParams = new LazyMatcher(() => new Match esJsonObject(
362 "completion.getSuggestions params", { 362 "completion.getSuggestions params", {
363 "file": isFilePath, 363 "file": isFilePath,
364 "offset": isInt 364 "offset": isInt
365 }); 365 }));
366 366
367 /** 367 /**
368 * completion.getSuggestions result 368 * completion.getSuggestions result
369 * 369 *
370 * { 370 * {
371 * "id": CompletionId 371 * "id": CompletionId
372 * } 372 * }
373 */ 373 */
374 final Matcher isCompletionGetSuggestionsResult = new MatchesJsonObject( 374 final Matcher isCompletionGetSuggestionsResult = new LazyMatcher(() => new Match esJsonObject(
375 "completion.getSuggestions result", { 375 "completion.getSuggestions result", {
376 "id": isCompletionId 376 "id": isCompletionId
377 }); 377 }));
378 378
379 /** 379 /**
380 * completion.results params 380 * completion.results params
381 * 381 *
382 * { 382 * {
383 * "id": CompletionId 383 * "id": CompletionId
384 * "replacementOffset": int 384 * "replacementOffset": int
385 * "replacementLength": int 385 * "replacementLength": int
386 * "results": List<CompletionSuggestion> 386 * "results": List<CompletionSuggestion>
387 * "last": bool 387 * "last": bool
388 * } 388 * }
389 */ 389 */
390 final Matcher isCompletionResultsParams = new MatchesJsonObject( 390 final Matcher isCompletionResultsParams = new LazyMatcher(() => new MatchesJsonO bject(
391 "completion.results params", { 391 "completion.results params", {
392 "id": isCompletionId, 392 "id": isCompletionId,
393 "replacementOffset": isInt, 393 "replacementOffset": isInt,
394 "replacementLength": isInt, 394 "replacementLength": isInt,
395 "results": isListOf(isCompletionSuggestion), 395 "results": isListOf(isCompletionSuggestion),
396 "last": isBool 396 "last": isBool
397 }); 397 }));
398 398
399 /** 399 /**
400 * search.findElementReferences params 400 * search.findElementReferences params
401 * 401 *
402 * { 402 * {
403 * "file": FilePath 403 * "file": FilePath
404 * "offset": int 404 * "offset": int
405 * "includePotential": bool 405 * "includePotential": bool
406 * } 406 * }
407 */ 407 */
408 final Matcher isSearchFindElementReferencesParams = new MatchesJsonObject( 408 final Matcher isSearchFindElementReferencesParams = new LazyMatcher(() => new Ma tchesJsonObject(
409 "search.findElementReferences params", { 409 "search.findElementReferences params", {
410 "file": isFilePath, 410 "file": isFilePath,
411 "offset": isInt, 411 "offset": isInt,
412 "includePotential": isBool 412 "includePotential": isBool
413 }); 413 }));
414 414
415 /** 415 /**
416 * search.findElementReferences result 416 * search.findElementReferences result
417 * 417 *
418 * { 418 * {
419 * "id": SearchId 419 * "id": SearchId
420 * "element": Element 420 * "element": Element
421 * } 421 * }
422 */ 422 */
423 final Matcher isSearchFindElementReferencesResult = new MatchesJsonObject( 423 final Matcher isSearchFindElementReferencesResult = new LazyMatcher(() => new Ma tchesJsonObject(
424 "search.findElementReferences result", { 424 "search.findElementReferences result", {
425 "id": isSearchId, 425 "id": isSearchId,
426 "element": isElement 426 "element": isElement
427 }); 427 }));
428 428
429 /** 429 /**
430 * search.findMemberDeclarations params 430 * search.findMemberDeclarations params
431 * 431 *
432 * { 432 * {
433 * "name": String 433 * "name": String
434 * } 434 * }
435 */ 435 */
436 final Matcher isSearchFindMemberDeclarationsParams = new MatchesJsonObject( 436 final Matcher isSearchFindMemberDeclarationsParams = new LazyMatcher(() => new M atchesJsonObject(
437 "search.findMemberDeclarations params", { 437 "search.findMemberDeclarations params", {
438 "name": isString 438 "name": isString
439 }); 439 }));
440 440
441 /** 441 /**
442 * search.findMemberDeclarations result 442 * search.findMemberDeclarations result
443 * 443 *
444 * { 444 * {
445 * "id": SearchId 445 * "id": SearchId
446 * } 446 * }
447 */ 447 */
448 final Matcher isSearchFindMemberDeclarationsResult = new MatchesJsonObject( 448 final Matcher isSearchFindMemberDeclarationsResult = new LazyMatcher(() => new M atchesJsonObject(
449 "search.findMemberDeclarations result", { 449 "search.findMemberDeclarations result", {
450 "id": isSearchId 450 "id": isSearchId
451 }); 451 }));
452 452
453 /** 453 /**
454 * search.findMemberReferences params 454 * search.findMemberReferences params
455 * 455 *
456 * { 456 * {
457 * "name": String 457 * "name": String
458 * } 458 * }
459 */ 459 */
460 final Matcher isSearchFindMemberReferencesParams = new MatchesJsonObject( 460 final Matcher isSearchFindMemberReferencesParams = new LazyMatcher(() => new Mat chesJsonObject(
461 "search.findMemberReferences params", { 461 "search.findMemberReferences params", {
462 "name": isString 462 "name": isString
463 }); 463 }));
464 464
465 /** 465 /**
466 * search.findMemberReferences result 466 * search.findMemberReferences result
467 * 467 *
468 * { 468 * {
469 * "id": SearchId 469 * "id": SearchId
470 * } 470 * }
471 */ 471 */
472 final Matcher isSearchFindMemberReferencesResult = new MatchesJsonObject( 472 final Matcher isSearchFindMemberReferencesResult = new LazyMatcher(() => new Mat chesJsonObject(
473 "search.findMemberReferences result", { 473 "search.findMemberReferences result", {
474 "id": isSearchId 474 "id": isSearchId
475 }); 475 }));
476 476
477 /** 477 /**
478 * search.findTopLevelDeclarations params 478 * search.findTopLevelDeclarations params
479 * 479 *
480 * { 480 * {
481 * "pattern": String 481 * "pattern": String
482 * } 482 * }
483 */ 483 */
484 final Matcher isSearchFindTopLevelDeclarationsParams = new MatchesJsonObject( 484 final Matcher isSearchFindTopLevelDeclarationsParams = new LazyMatcher(() => new MatchesJsonObject(
485 "search.findTopLevelDeclarations params", { 485 "search.findTopLevelDeclarations params", {
486 "pattern": isString 486 "pattern": isString
487 }); 487 }));
488 488
489 /** 489 /**
490 * search.findTopLevelDeclarations result 490 * search.findTopLevelDeclarations result
491 * 491 *
492 * { 492 * {
493 * "id": SearchId 493 * "id": SearchId
494 * } 494 * }
495 */ 495 */
496 final Matcher isSearchFindTopLevelDeclarationsResult = new MatchesJsonObject( 496 final Matcher isSearchFindTopLevelDeclarationsResult = new LazyMatcher(() => new MatchesJsonObject(
497 "search.findTopLevelDeclarations result", { 497 "search.findTopLevelDeclarations result", {
498 "id": isSearchId 498 "id": isSearchId
499 }); 499 }));
500 500
501 /** 501 /**
502 * search.getTypeHierarchy params 502 * search.getTypeHierarchy params
503 * 503 *
504 * { 504 * {
505 * "file": FilePath 505 * "file": FilePath
506 * "offset": int 506 * "offset": int
507 * } 507 * }
508 */ 508 */
509 final Matcher isSearchGetTypeHierarchyParams = new MatchesJsonObject( 509 final Matcher isSearchGetTypeHierarchyParams = new LazyMatcher(() => new Matches JsonObject(
510 "search.getTypeHierarchy params", { 510 "search.getTypeHierarchy params", {
511 "file": isFilePath, 511 "file": isFilePath,
512 "offset": isInt 512 "offset": isInt
513 }); 513 }));
514 514
515 /** 515 /**
516 * search.getTypeHierarchy result 516 * search.getTypeHierarchy result
517 * 517 *
518 * { 518 * {
519 * "hierarchyItems": optional List<TypeHierarchyItem> 519 * "hierarchyItems": optional List<TypeHierarchyItem>
520 * } 520 * }
521 */ 521 */
522 final Matcher isSearchGetTypeHierarchyResult = new MatchesJsonObject( 522 final Matcher isSearchGetTypeHierarchyResult = new LazyMatcher(() => new Matches JsonObject(
523 "search.getTypeHierarchy result", null, optionalFields: { 523 "search.getTypeHierarchy result", null, optionalFields: {
524 "hierarchyItems": isListOf(isTypeHierarchyItem) 524 "hierarchyItems": isListOf(isTypeHierarchyItem)
525 }); 525 }));
526 526
527 /** 527 /**
528 * search.results params 528 * search.results params
529 * 529 *
530 * { 530 * {
531 * "id": SearchId 531 * "id": SearchId
532 * "results": List<SearchResult> 532 * "results": List<SearchResult>
533 * "last": bool 533 * "last": bool
534 * } 534 * }
535 */ 535 */
536 final Matcher isSearchResultsParams = new MatchesJsonObject( 536 final Matcher isSearchResultsParams = new LazyMatcher(() => new MatchesJsonObjec t(
537 "search.results params", { 537 "search.results params", {
538 "id": isSearchId, 538 "id": isSearchId,
539 "results": isListOf(isSearchResult), 539 "results": isListOf(isSearchResult),
540 "last": isBool 540 "last": isBool
541 }); 541 }));
542 542
543 /** 543 /**
544 * edit.getAssists params 544 * edit.getAssists params
545 * 545 *
546 * { 546 * {
547 * "file": FilePath 547 * "file": FilePath
548 * "offset": int 548 * "offset": int
549 * "length": int 549 * "length": int
550 * } 550 * }
551 */ 551 */
552 final Matcher isEditGetAssistsParams = new MatchesJsonObject( 552 final Matcher isEditGetAssistsParams = new LazyMatcher(() => new MatchesJsonObje ct(
553 "edit.getAssists params", { 553 "edit.getAssists params", {
554 "file": isFilePath, 554 "file": isFilePath,
555 "offset": isInt, 555 "offset": isInt,
556 "length": isInt 556 "length": isInt
557 }); 557 }));
558 558
559 /** 559 /**
560 * edit.getAssists result 560 * edit.getAssists result
561 * 561 *
562 * { 562 * {
563 * "assists": List<SourceChange> 563 * "assists": List<SourceChange>
564 * } 564 * }
565 */ 565 */
566 final Matcher isEditGetAssistsResult = new MatchesJsonObject( 566 final Matcher isEditGetAssistsResult = new LazyMatcher(() => new MatchesJsonObje ct(
567 "edit.getAssists result", { 567 "edit.getAssists result", {
568 "assists": isListOf(isSourceChange) 568 "assists": isListOf(isSourceChange)
569 }); 569 }));
570 570
571 /** 571 /**
572 * edit.getAvailableRefactorings params 572 * edit.getAvailableRefactorings params
573 * 573 *
574 * { 574 * {
575 * "file": FilePath 575 * "file": FilePath
576 * "offset": int 576 * "offset": int
577 * "length": int 577 * "length": int
578 * } 578 * }
579 */ 579 */
580 final Matcher isEditGetAvailableRefactoringsParams = new MatchesJsonObject( 580 final Matcher isEditGetAvailableRefactoringsParams = new LazyMatcher(() => new M atchesJsonObject(
581 "edit.getAvailableRefactorings params", { 581 "edit.getAvailableRefactorings params", {
582 "file": isFilePath, 582 "file": isFilePath,
583 "offset": isInt, 583 "offset": isInt,
584 "length": isInt 584 "length": isInt
585 }); 585 }));
586 586
587 /** 587 /**
588 * edit.getAvailableRefactorings result 588 * edit.getAvailableRefactorings result
589 * 589 *
590 * { 590 * {
591 * "kinds": List<RefactoringKind> 591 * "kinds": List<RefactoringKind>
592 * } 592 * }
593 */ 593 */
594 final Matcher isEditGetAvailableRefactoringsResult = new MatchesJsonObject( 594 final Matcher isEditGetAvailableRefactoringsResult = new LazyMatcher(() => new M atchesJsonObject(
595 "edit.getAvailableRefactorings result", { 595 "edit.getAvailableRefactorings result", {
596 "kinds": isListOf(isRefactoringKind) 596 "kinds": isListOf(isRefactoringKind)
597 }); 597 }));
598 598
599 /** 599 /**
600 * edit.getFixes params 600 * edit.getFixes params
601 * 601 *
602 * { 602 * {
603 * "file": FilePath 603 * "file": FilePath
604 * "offset": int 604 * "offset": int
605 * } 605 * }
606 */ 606 */
607 final Matcher isEditGetFixesParams = new MatchesJsonObject( 607 final Matcher isEditGetFixesParams = new LazyMatcher(() => new MatchesJsonObject (
608 "edit.getFixes params", { 608 "edit.getFixes params", {
609 "file": isFilePath, 609 "file": isFilePath,
610 "offset": isInt 610 "offset": isInt
611 }); 611 }));
612 612
613 /** 613 /**
614 * edit.getFixes result 614 * edit.getFixes result
615 * 615 *
616 * { 616 * {
617 * "fixes": List<ErrorFixes> 617 * "fixes": List<ErrorFixes>
618 * } 618 * }
619 */ 619 */
620 final Matcher isEditGetFixesResult = new MatchesJsonObject( 620 final Matcher isEditGetFixesResult = new LazyMatcher(() => new MatchesJsonObject (
621 "edit.getFixes result", { 621 "edit.getFixes result", {
622 "fixes": isListOf(isErrorFixes) 622 "fixes": isListOf(isErrorFixes)
623 }); 623 }));
624 624
625 /** 625 /**
626 * edit.getRefactoring params 626 * edit.getRefactoring params
627 * 627 *
628 * { 628 * {
629 * "kindId": RefactoringKind 629 * "kindId": RefactoringKind
630 * "file": FilePath 630 * "file": FilePath
631 * "offset": int 631 * "offset": int
632 * "length": int 632 * "length": int
633 * "validateOnly": bool 633 * "validateOnly": bool
634 * "options": optional object 634 * "options": optional object
635 * } 635 * }
636 */ 636 */
637 final Matcher isEditGetRefactoringParams = new MatchesJsonObject( 637 final Matcher isEditGetRefactoringParams = new LazyMatcher(() => new MatchesJson Object(
638 "edit.getRefactoring params", { 638 "edit.getRefactoring params", {
639 "kindId": isRefactoringKind, 639 "kindId": isRefactoringKind,
640 "file": isFilePath, 640 "file": isFilePath,
641 "offset": isInt, 641 "offset": isInt,
642 "length": isInt, 642 "length": isInt,
643 "validateOnly": isBool 643 "validateOnly": isBool
644 }, optionalFields: { 644 }, optionalFields: {
645 "options": isObject 645 "options": isObject
646 }); 646 }));
647 647
648 /** 648 /**
649 * edit.getRefactoring result 649 * edit.getRefactoring result
650 * 650 *
651 * { 651 * {
652 * "status": List<RefactoringProblem> 652 * "status": List<RefactoringProblem>
653 * "feedback": optional object 653 * "feedback": optional object
654 * "change": optional SourceChange 654 * "change": optional SourceChange
655 * } 655 * }
656 */ 656 */
657 final Matcher isEditGetRefactoringResult = new MatchesJsonObject( 657 final Matcher isEditGetRefactoringResult = new LazyMatcher(() => new MatchesJson Object(
658 "edit.getRefactoring result", { 658 "edit.getRefactoring result", {
659 "status": isListOf(isRefactoringProblem) 659 "status": isListOf(isRefactoringProblem)
660 }, optionalFields: { 660 }, optionalFields: {
661 "feedback": isObject, 661 "feedback": isObject,
662 "change": isSourceChange 662 "change": isSourceChange
663 }); 663 }));
664 664
665 /** 665 /**
666 * debug.createContext params 666 * debug.createContext params
667 * 667 *
668 * { 668 * {
669 * "contextRoot": FilePath 669 * "contextRoot": FilePath
670 * } 670 * }
671 */ 671 */
672 final Matcher isDebugCreateContextParams = new MatchesJsonObject( 672 final Matcher isDebugCreateContextParams = new LazyMatcher(() => new MatchesJson Object(
673 "debug.createContext params", { 673 "debug.createContext params", {
674 "contextRoot": isFilePath 674 "contextRoot": isFilePath
675 }); 675 }));
676 676
677 /** 677 /**
678 * debug.createContext result 678 * debug.createContext result
679 * 679 *
680 * { 680 * {
681 * "id": DebugContextId 681 * "id": DebugContextId
682 * } 682 * }
683 */ 683 */
684 final Matcher isDebugCreateContextResult = new MatchesJsonObject( 684 final Matcher isDebugCreateContextResult = new LazyMatcher(() => new MatchesJson Object(
685 "debug.createContext result", { 685 "debug.createContext result", {
686 "id": isDebugContextId 686 "id": isDebugContextId
687 }); 687 }));
688 688
689 /** 689 /**
690 * debug.deleteContext params 690 * debug.deleteContext params
691 * 691 *
692 * { 692 * {
693 * "id": DebugContextId 693 * "id": DebugContextId
694 * } 694 * }
695 */ 695 */
696 final Matcher isDebugDeleteContextParams = new MatchesJsonObject( 696 final Matcher isDebugDeleteContextParams = new LazyMatcher(() => new MatchesJson Object(
697 "debug.deleteContext params", { 697 "debug.deleteContext params", {
698 "id": isDebugContextId 698 "id": isDebugContextId
699 }); 699 }));
700 700
701 /** 701 /**
702 * debug.deleteContext result 702 * debug.deleteContext result
703 */ 703 */
704 final Matcher isDebugDeleteContextResult = isNull; 704 final Matcher isDebugDeleteContextResult = isNull;
705 705
706 /** 706 /**
707 * debug.mapUri params 707 * debug.mapUri params
708 * 708 *
709 * { 709 * {
710 * "id": DebugContextId 710 * "id": DebugContextId
711 * "file": optional FilePath 711 * "file": optional FilePath
712 * "uri": optional String 712 * "uri": optional String
713 * } 713 * }
714 */ 714 */
715 final Matcher isDebugMapUriParams = new MatchesJsonObject( 715 final Matcher isDebugMapUriParams = new LazyMatcher(() => new MatchesJsonObject(
716 "debug.mapUri params", { 716 "debug.mapUri params", {
717 "id": isDebugContextId 717 "id": isDebugContextId
718 }, optionalFields: { 718 }, optionalFields: {
719 "file": isFilePath, 719 "file": isFilePath,
720 "uri": isString 720 "uri": isString
721 }); 721 }));
722 722
723 /** 723 /**
724 * debug.mapUri result 724 * debug.mapUri result
725 * 725 *
726 * { 726 * {
727 * "file": optional FilePath 727 * "file": optional FilePath
728 * "uri": optional String 728 * "uri": optional String
729 * } 729 * }
730 */ 730 */
731 final Matcher isDebugMapUriResult = new MatchesJsonObject( 731 final Matcher isDebugMapUriResult = new LazyMatcher(() => new MatchesJsonObject(
732 "debug.mapUri result", null, optionalFields: { 732 "debug.mapUri result", null, optionalFields: {
733 "file": isFilePath, 733 "file": isFilePath,
734 "uri": isString 734 "uri": isString
735 }); 735 }));
736 736
737 /** 737 /**
738 * debug.setSubscriptions params 738 * debug.setSubscriptions params
739 * 739 *
740 * { 740 * {
741 * "subscriptions": List<DebugService> 741 * "subscriptions": List<DebugService>
742 * } 742 * }
743 */ 743 */
744 final Matcher isDebugSetSubscriptionsParams = new MatchesJsonObject( 744 final Matcher isDebugSetSubscriptionsParams = new LazyMatcher(() => new MatchesJ sonObject(
745 "debug.setSubscriptions params", { 745 "debug.setSubscriptions params", {
746 "subscriptions": isListOf(isDebugService) 746 "subscriptions": isListOf(isDebugService)
747 }); 747 }));
748 748
749 /** 749 /**
750 * debug.setSubscriptions result 750 * debug.setSubscriptions result
751 */ 751 */
752 final Matcher isDebugSetSubscriptionsResult = isNull; 752 final Matcher isDebugSetSubscriptionsResult = isNull;
753 753
754 /** 754 /**
755 * debug.launchData params 755 * debug.launchData params
756 * 756 *
757 * { 757 * {
758 * "executables": List<ExecutableFile> 758 * "executables": List<ExecutableFile>
759 * "dartToHtml": Map<FilePath, List<FilePath>> 759 * "dartToHtml": Map<FilePath, List<FilePath>>
760 * "htmlToDart": Map<FilePath, List<FilePath>> 760 * "htmlToDart": Map<FilePath, List<FilePath>>
761 * } 761 * }
762 */ 762 */
763 final Matcher isDebugLaunchDataParams = new MatchesJsonObject( 763 final Matcher isDebugLaunchDataParams = new LazyMatcher(() => new MatchesJsonObj ect(
764 "debug.launchData params", { 764 "debug.launchData params", {
765 "executables": isListOf(isExecutableFile), 765 "executables": isListOf(isExecutableFile),
766 "dartToHtml": isMapOf(isFilePath, isListOf(isFilePath)), 766 "dartToHtml": isMapOf(isFilePath, isListOf(isFilePath)),
767 "htmlToDart": isMapOf(isFilePath, isListOf(isFilePath)) 767 "htmlToDart": isMapOf(isFilePath, isListOf(isFilePath))
768 }); 768 }));
769 769
770 /** 770 /**
771 * AddContentOverlay 771 * AddContentOverlay
772 * 772 *
773 * { 773 * {
774 * "type": "add" 774 * "type": "add"
775 * "content": String 775 * "content": String
776 * } 776 * }
777 */ 777 */
778 final Matcher isAddContentOverlay = new MatchesJsonObject( 778 final Matcher isAddContentOverlay = new LazyMatcher(() => new MatchesJsonObject(
779 "AddContentOverlay", { 779 "AddContentOverlay", {
780 "type": equals("add"), 780 "type": equals("add"),
781 "content": isString 781 "content": isString
782 }); 782 }));
783 783
784 /** 784 /**
785 * AnalysisError 785 * AnalysisError
786 * 786 *
787 * { 787 * {
788 * "severity": ErrorSeverity 788 * "severity": ErrorSeverity
789 * "type": ErrorType 789 * "type": ErrorType
790 * "location": Location 790 * "location": Location
791 * "message": String 791 * "message": String
792 * "correction": optional String 792 * "correction": optional String
793 * } 793 * }
794 */ 794 */
795 final Matcher isAnalysisError = new MatchesJsonObject( 795 final Matcher isAnalysisError = new LazyMatcher(() => new MatchesJsonObject(
796 "AnalysisError", { 796 "AnalysisError", {
797 "severity": isErrorSeverity, 797 "severity": isErrorSeverity,
798 "type": isErrorType, 798 "type": isErrorType,
799 "location": isLocation, 799 "location": isLocation,
800 "message": isString 800 "message": isString
801 }, optionalFields: { 801 }, optionalFields: {
802 "correction": isString 802 "correction": isString
803 }); 803 }));
804 804
805 /** 805 /**
806 * AnalysisOptions 806 * AnalysisOptions
807 * 807 *
808 * { 808 * {
809 * "enableAsync": optional bool 809 * "enableAsync": optional bool
810 * "enableDeferredLoading": optional bool 810 * "enableDeferredLoading": optional bool
811 * "enableEnums": optional bool 811 * "enableEnums": optional bool
812 * "generateDart2jsHints": optional bool 812 * "generateDart2jsHints": optional bool
813 * "generateHints": optional bool 813 * "generateHints": optional bool
814 * } 814 * }
815 */ 815 */
816 final Matcher isAnalysisOptions = new MatchesJsonObject( 816 final Matcher isAnalysisOptions = new LazyMatcher(() => new MatchesJsonObject(
817 "AnalysisOptions", null, optionalFields: { 817 "AnalysisOptions", null, optionalFields: {
818 "enableAsync": isBool, 818 "enableAsync": isBool,
819 "enableDeferredLoading": isBool, 819 "enableDeferredLoading": isBool,
820 "enableEnums": isBool, 820 "enableEnums": isBool,
821 "generateDart2jsHints": isBool, 821 "generateDart2jsHints": isBool,
822 "generateHints": isBool 822 "generateHints": isBool
823 }); 823 }));
824 824
825 /** 825 /**
826 * AnalysisService 826 * AnalysisService
827 * 827 *
828 * enum { 828 * enum {
829 * FOLDING 829 * FOLDING
830 * HIGHLIGHTS 830 * HIGHLIGHTS
831 * NAVIGATION 831 * NAVIGATION
832 * OCCURRENCES 832 * OCCURRENCES
833 * OUTLINE 833 * OUTLINE
(...skipping 10 matching lines...) Expand all
844 ]); 844 ]);
845 845
846 /** 846 /**
847 * AnalysisStatus 847 * AnalysisStatus
848 * 848 *
849 * { 849 * {
850 * "analyzing": bool 850 * "analyzing": bool
851 * "analysisTarget": optional String 851 * "analysisTarget": optional String
852 * } 852 * }
853 */ 853 */
854 final Matcher isAnalysisStatus = new MatchesJsonObject( 854 final Matcher isAnalysisStatus = new LazyMatcher(() => new MatchesJsonObject(
855 "AnalysisStatus", { 855 "AnalysisStatus", {
856 "analyzing": isBool 856 "analyzing": isBool
857 }, optionalFields: { 857 }, optionalFields: {
858 "analysisTarget": isString 858 "analysisTarget": isString
859 }); 859 }));
860 860
861 /** 861 /**
862 * ChangeContentOverlay 862 * ChangeContentOverlay
863 * 863 *
864 * { 864 * {
865 * "type": "change" 865 * "type": "change"
866 * "edits": List<SourceEdit> 866 * "edits": List<SourceEdit>
867 * } 867 * }
868 */ 868 */
869 final Matcher isChangeContentOverlay = new MatchesJsonObject( 869 final Matcher isChangeContentOverlay = new LazyMatcher(() => new MatchesJsonObje ct(
870 "ChangeContentOverlay", { 870 "ChangeContentOverlay", {
871 "type": equals("change"), 871 "type": equals("change"),
872 "edits": isListOf(isSourceEdit) 872 "edits": isListOf(isSourceEdit)
873 }); 873 }));
874 874
875 /** 875 /**
876 * CompletionId 876 * CompletionId
877 * 877 *
878 * String 878 * String
879 */ 879 */
880 final Matcher isCompletionId = isString; 880 final Matcher isCompletionId = isString;
881 881
882 /** 882 /**
883 * CompletionRelevance 883 * CompletionRelevance
(...skipping 26 matching lines...) Expand all
910 * "declaringType": optional String 910 * "declaringType": optional String
911 * "returnType": optional String 911 * "returnType": optional String
912 * "parameterNames": optional List<String> 912 * "parameterNames": optional List<String>
913 * "parameterTypes": optional List<String> 913 * "parameterTypes": optional List<String>
914 * "requiredParameterCount": optional int 914 * "requiredParameterCount": optional int
915 * "positionalParameterCount": optional int 915 * "positionalParameterCount": optional int
916 * "parameterName": optional String 916 * "parameterName": optional String
917 * "parameterType": optional String 917 * "parameterType": optional String
918 * } 918 * }
919 */ 919 */
920 final Matcher isCompletionSuggestion = new MatchesJsonObject( 920 final Matcher isCompletionSuggestion = new LazyMatcher(() => new MatchesJsonObje ct(
921 "CompletionSuggestion", { 921 "CompletionSuggestion", {
922 "kind": isCompletionSuggestionKind, 922 "kind": isCompletionSuggestionKind,
923 "relevance": isCompletionRelevance, 923 "relevance": isCompletionRelevance,
924 "completion": isString, 924 "completion": isString,
925 "selectionOffset": isInt, 925 "selectionOffset": isInt,
926 "selectionLength": isInt, 926 "selectionLength": isInt,
927 "isDeprecated": isBool, 927 "isDeprecated": isBool,
928 "isPotential": isBool 928 "isPotential": isBool
929 }, optionalFields: { 929 }, optionalFields: {
930 "docSummary": isString, 930 "docSummary": isString,
931 "docComplete": isString, 931 "docComplete": isString,
932 "declaringType": isString, 932 "declaringType": isString,
933 "returnType": isString, 933 "returnType": isString,
934 "parameterNames": isListOf(isString), 934 "parameterNames": isListOf(isString),
935 "parameterTypes": isListOf(isString), 935 "parameterTypes": isListOf(isString),
936 "requiredParameterCount": isInt, 936 "requiredParameterCount": isInt,
937 "positionalParameterCount": isInt, 937 "positionalParameterCount": isInt,
938 "parameterName": isString, 938 "parameterName": isString,
939 "parameterType": isString 939 "parameterType": isString
940 }); 940 }));
941 941
942 /** 942 /**
943 * CompletionSuggestionKind 943 * CompletionSuggestionKind
944 * 944 *
945 * enum { 945 * enum {
946 * ARGUMENT_LIST 946 * ARGUMENT_LIST
947 * CLASS 947 * CLASS
948 * CLASS_ALIAS 948 * CLASS_ALIAS
949 * CONSTRUCTOR 949 * CONSTRUCTOR
950 * FIELD 950 * FIELD
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 * 1009 *
1010 * { 1010 * {
1011 * "kind": ElementKind 1011 * "kind": ElementKind
1012 * "name": String 1012 * "name": String
1013 * "location": optional Location 1013 * "location": optional Location
1014 * "flags": int 1014 * "flags": int
1015 * "parameters": optional String 1015 * "parameters": optional String
1016 * "returnType": optional String 1016 * "returnType": optional String
1017 * } 1017 * }
1018 */ 1018 */
1019 final Matcher isElement = new MatchesJsonObject( 1019 final Matcher isElement = new LazyMatcher(() => new MatchesJsonObject(
1020 "Element", { 1020 "Element", {
1021 "kind": isElementKind, 1021 "kind": isElementKind,
1022 "name": isString, 1022 "name": isString,
1023 "flags": isInt 1023 "flags": isInt
1024 }, optionalFields: { 1024 }, optionalFields: {
1025 "location": isLocation, 1025 "location": isLocation,
1026 "parameters": isString, 1026 "parameters": isString,
1027 "returnType": isString 1027 "returnType": isString
1028 }); 1028 }));
1029 1029
1030 /** 1030 /**
1031 * ElementKind 1031 * ElementKind
1032 * 1032 *
1033 * enum { 1033 * enum {
1034 * CLASS 1034 * CLASS
1035 * CLASS_TYPE_ALIAS 1035 * CLASS_TYPE_ALIAS
1036 * COMPILATION_UNIT 1036 * COMPILATION_UNIT
1037 * CONSTRUCTOR 1037 * CONSTRUCTOR
1038 * FIELD 1038 * FIELD
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 1074
1075 /** 1075 /**
1076 * Error 1076 * Error
1077 * 1077 *
1078 * { 1078 * {
1079 * "code": String 1079 * "code": String
1080 * "message": String 1080 * "message": String
1081 * "data": optional object 1081 * "data": optional object
1082 * } 1082 * }
1083 */ 1083 */
1084 final Matcher isError = new MatchesJsonObject( 1084 final Matcher isError = new LazyMatcher(() => new MatchesJsonObject(
1085 "Error", { 1085 "Error", {
1086 "code": isString, 1086 "code": isString,
1087 "message": isString 1087 "message": isString
1088 }, optionalFields: { 1088 }, optionalFields: {
1089 "data": isObject 1089 "data": isObject
1090 }); 1090 }));
1091 1091
1092 /** 1092 /**
1093 * ErrorFixes 1093 * ErrorFixes
1094 * 1094 *
1095 * { 1095 * {
1096 * "error": AnalysisError 1096 * "error": AnalysisError
1097 * "fixes": List<SourceChange> 1097 * "fixes": List<SourceChange>
1098 * } 1098 * }
1099 */ 1099 */
1100 final Matcher isErrorFixes = new MatchesJsonObject( 1100 final Matcher isErrorFixes = new LazyMatcher(() => new MatchesJsonObject(
1101 "ErrorFixes", { 1101 "ErrorFixes", {
1102 "error": isAnalysisError, 1102 "error": isAnalysisError,
1103 "fixes": isListOf(isSourceChange) 1103 "fixes": isListOf(isSourceChange)
1104 }); 1104 }));
1105 1105
1106 /** 1106 /**
1107 * ErrorSeverity 1107 * ErrorSeverity
1108 * 1108 *
1109 * enum { 1109 * enum {
1110 * INFO 1110 * INFO
1111 * WARNING 1111 * WARNING
1112 * ERROR 1112 * ERROR
1113 * } 1113 * }
1114 */ 1114 */
(...skipping 25 matching lines...) Expand all
1140 ]); 1140 ]);
1141 1141
1142 /** 1142 /**
1143 * ExecutableFile 1143 * ExecutableFile
1144 * 1144 *
1145 * { 1145 * {
1146 * "file": FilePath 1146 * "file": FilePath
1147 * "offset": ExecutableKind 1147 * "offset": ExecutableKind
1148 * } 1148 * }
1149 */ 1149 */
1150 final Matcher isExecutableFile = new MatchesJsonObject( 1150 final Matcher isExecutableFile = new LazyMatcher(() => new MatchesJsonObject(
1151 "ExecutableFile", { 1151 "ExecutableFile", {
1152 "file": isFilePath, 1152 "file": isFilePath,
1153 "offset": isExecutableKind 1153 "offset": isExecutableKind
1154 }); 1154 }));
1155 1155
1156 /** 1156 /**
1157 * ExecutableKind 1157 * ExecutableKind
1158 * 1158 *
1159 * enum { 1159 * enum {
1160 * CLIENT 1160 * CLIENT
1161 * EITHER 1161 * EITHER
1162 * SERVER 1162 * SERVER
1163 * } 1163 * }
1164 */ 1164 */
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 1196
1197 /** 1197 /**
1198 * FoldingRegion 1198 * FoldingRegion
1199 * 1199 *
1200 * { 1200 * {
1201 * "kind": FoldingKind 1201 * "kind": FoldingKind
1202 * "offset": int 1202 * "offset": int
1203 * "length": int 1203 * "length": int
1204 * } 1204 * }
1205 */ 1205 */
1206 final Matcher isFoldingRegion = new MatchesJsonObject( 1206 final Matcher isFoldingRegion = new LazyMatcher(() => new MatchesJsonObject(
1207 "FoldingRegion", { 1207 "FoldingRegion", {
1208 "kind": isFoldingKind, 1208 "kind": isFoldingKind,
1209 "offset": isInt, 1209 "offset": isInt,
1210 "length": isInt 1210 "length": isInt
1211 }); 1211 }));
1212 1212
1213 /** 1213 /**
1214 * HighlightRegion 1214 * HighlightRegion
1215 * 1215 *
1216 * { 1216 * {
1217 * "type": HighlightRegionType 1217 * "type": HighlightRegionType
1218 * "offset": int 1218 * "offset": int
1219 * "length": int 1219 * "length": int
1220 * } 1220 * }
1221 */ 1221 */
1222 final Matcher isHighlightRegion = new MatchesJsonObject( 1222 final Matcher isHighlightRegion = new LazyMatcher(() => new MatchesJsonObject(
1223 "HighlightRegion", { 1223 "HighlightRegion", {
1224 "type": isHighlightRegionType, 1224 "type": isHighlightRegionType,
1225 "offset": isInt, 1225 "offset": isInt,
1226 "length": isInt 1226 "length": isInt
1227 }); 1227 }));
1228 1228
1229 /** 1229 /**
1230 * HighlightRegionType 1230 * HighlightRegionType
1231 * 1231 *
1232 * enum { 1232 * enum {
1233 * ANNOTATION 1233 * ANNOTATION
1234 * BUILT_IN 1234 * BUILT_IN
1235 * CLASS 1235 * CLASS
1236 * COMMENT_BLOCK 1236 * COMMENT_BLOCK
1237 * COMMENT_DOCUMENTATION 1237 * COMMENT_DOCUMENTATION
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 * "containingLibraryPath": optional String 1314 * "containingLibraryPath": optional String
1315 * "containingLibraryName": optional String 1315 * "containingLibraryName": optional String
1316 * "dartdoc": optional String 1316 * "dartdoc": optional String
1317 * "elementDescription": optional String 1317 * "elementDescription": optional String
1318 * "elementKind": optional String 1318 * "elementKind": optional String
1319 * "parameter": optional String 1319 * "parameter": optional String
1320 * "propagatedType": optional String 1320 * "propagatedType": optional String
1321 * "staticType": optional String 1321 * "staticType": optional String
1322 * } 1322 * }
1323 */ 1323 */
1324 final Matcher isHoverInformation = new MatchesJsonObject( 1324 final Matcher isHoverInformation = new LazyMatcher(() => new MatchesJsonObject(
1325 "HoverInformation", { 1325 "HoverInformation", {
1326 "offset": isInt, 1326 "offset": isInt,
1327 "length": isInt 1327 "length": isInt
1328 }, optionalFields: { 1328 }, optionalFields: {
1329 "containingLibraryPath": isString, 1329 "containingLibraryPath": isString,
1330 "containingLibraryName": isString, 1330 "containingLibraryName": isString,
1331 "dartdoc": isString, 1331 "dartdoc": isString,
1332 "elementDescription": isString, 1332 "elementDescription": isString,
1333 "elementKind": isString, 1333 "elementKind": isString,
1334 "parameter": isString, 1334 "parameter": isString,
1335 "propagatedType": isString, 1335 "propagatedType": isString,
1336 "staticType": isString 1336 "staticType": isString
1337 }); 1337 }));
1338 1338
1339 /** 1339 /**
1340 * LinkedEditGroup 1340 * LinkedEditGroup
1341 * 1341 *
1342 * { 1342 * {
1343 * "positions": List<Position> 1343 * "positions": List<Position>
1344 * "length": int 1344 * "length": int
1345 * "suggestions": List<LinkedEditSuggestion> 1345 * "suggestions": List<LinkedEditSuggestion>
1346 * } 1346 * }
1347 */ 1347 */
1348 final Matcher isLinkedEditGroup = new MatchesJsonObject( 1348 final Matcher isLinkedEditGroup = new LazyMatcher(() => new MatchesJsonObject(
1349 "LinkedEditGroup", { 1349 "LinkedEditGroup", {
1350 "positions": isListOf(isPosition), 1350 "positions": isListOf(isPosition),
1351 "length": isInt, 1351 "length": isInt,
1352 "suggestions": isListOf(isLinkedEditSuggestion) 1352 "suggestions": isListOf(isLinkedEditSuggestion)
1353 }); 1353 }));
1354 1354
1355 /** 1355 /**
1356 * LinkedEditSuggestion 1356 * LinkedEditSuggestion
1357 * 1357 *
1358 * { 1358 * {
1359 * "value": String 1359 * "value": String
1360 * "kind": LinkedEditSuggestionKind 1360 * "kind": LinkedEditSuggestionKind
1361 * } 1361 * }
1362 */ 1362 */
1363 final Matcher isLinkedEditSuggestion = new MatchesJsonObject( 1363 final Matcher isLinkedEditSuggestion = new LazyMatcher(() => new MatchesJsonObje ct(
1364 "LinkedEditSuggestion", { 1364 "LinkedEditSuggestion", {
1365 "value": isString, 1365 "value": isString,
1366 "kind": isLinkedEditSuggestionKind 1366 "kind": isLinkedEditSuggestionKind
1367 }); 1367 }));
1368 1368
1369 /** 1369 /**
1370 * LinkedEditSuggestionKind 1370 * LinkedEditSuggestionKind
1371 * 1371 *
1372 * enum { 1372 * enum {
1373 * METHOD 1373 * METHOD
1374 * PARAMETER 1374 * PARAMETER
1375 * TYPE 1375 * TYPE
1376 * VARIABLE 1376 * VARIABLE
1377 * } 1377 * }
1378 */ 1378 */
1379 final Matcher isLinkedEditSuggestionKind = new MatchesEnum("LinkedEditSuggestion Kind", [ 1379 final Matcher isLinkedEditSuggestionKind = new MatchesEnum("LinkedEditSuggestion Kind", [
1380 "METHOD", 1380 "METHOD",
1381 "PARAMETER", 1381 "PARAMETER",
1382 "TYPE", 1382 "TYPE",
1383 "VARIABLE" 1383 "VARIABLE"
1384 ]); 1384 ]);
1385 1385
1386 /** 1386 /**
1387 * Location 1387 * Location
1388 * 1388 *
1389 * { 1389 * {
1390 * "file": FilePath 1390 * "file": FilePath
1391 * "offset": int 1391 * "offset": int
1392 * "length": int 1392 * "length": int
1393 * "startLine": int 1393 * "startLine": int
1394 * "startColumn": int 1394 * "startColumn": int
1395 * } 1395 * }
1396 */ 1396 */
1397 final Matcher isLocation = new MatchesJsonObject( 1397 final Matcher isLocation = new LazyMatcher(() => new MatchesJsonObject(
1398 "Location", { 1398 "Location", {
1399 "file": isFilePath, 1399 "file": isFilePath,
1400 "offset": isInt, 1400 "offset": isInt,
1401 "length": isInt, 1401 "length": isInt,
1402 "startLine": isInt, 1402 "startLine": isInt,
1403 "startColumn": isInt 1403 "startColumn": isInt
1404 }); 1404 }));
1405 1405
1406 /** 1406 /**
1407 * NavigationRegion 1407 * NavigationRegion
1408 * 1408 *
1409 * { 1409 * {
1410 * "offset": int 1410 * "offset": int
1411 * "length": int 1411 * "length": int
1412 * "targets": List<Element> 1412 * "targets": List<Element>
1413 * } 1413 * }
1414 */ 1414 */
1415 final Matcher isNavigationRegion = new MatchesJsonObject( 1415 final Matcher isNavigationRegion = new LazyMatcher(() => new MatchesJsonObject(
1416 "NavigationRegion", { 1416 "NavigationRegion", {
1417 "offset": isInt, 1417 "offset": isInt,
1418 "length": isInt, 1418 "length": isInt,
1419 "targets": isListOf(isElement) 1419 "targets": isListOf(isElement)
1420 }); 1420 }));
1421 1421
1422 /** 1422 /**
1423 * Occurrences 1423 * Occurrences
1424 * 1424 *
1425 * { 1425 * {
1426 * "element": Element 1426 * "element": Element
1427 * "offsets": List<int> 1427 * "offsets": List<int>
1428 * "length": int 1428 * "length": int
1429 * } 1429 * }
1430 */ 1430 */
1431 final Matcher isOccurrences = new MatchesJsonObject( 1431 final Matcher isOccurrences = new LazyMatcher(() => new MatchesJsonObject(
1432 "Occurrences", { 1432 "Occurrences", {
1433 "element": isElement, 1433 "element": isElement,
1434 "offsets": isListOf(isInt), 1434 "offsets": isListOf(isInt),
1435 "length": isInt 1435 "length": isInt
1436 }); 1436 }));
1437 1437
1438 /** 1438 /**
1439 * Outline 1439 * Outline
1440 * 1440 *
1441 * { 1441 * {
1442 * "element": Element 1442 * "element": Element
1443 * "offset": int 1443 * "offset": int
1444 * "length": int 1444 * "length": int
1445 * "children": optional List<Outline> 1445 * "children": optional List<Outline>
1446 * } 1446 * }
1447 */ 1447 */
1448 final Matcher isOutline = new MatchesJsonObject( 1448 final Matcher isOutline = new LazyMatcher(() => new MatchesJsonObject(
1449 "Outline", { 1449 "Outline", {
1450 "element": isElement, 1450 "element": isElement,
1451 "offset": isInt, 1451 "offset": isInt,
1452 "length": isInt 1452 "length": isInt
1453 }, optionalFields: { 1453 }, optionalFields: {
1454 "children": isListOf(isOutline) 1454 "children": isListOf(isOutline)
1455 }); 1455 }));
1456 1456
1457 /** 1457 /**
1458 * Override 1458 * Override
1459 * 1459 *
1460 * { 1460 * {
1461 * "offset": int 1461 * "offset": int
1462 * "length": int 1462 * "length": int
1463 * "superclassMember": optional OverriddenMember 1463 * "superclassMember": optional OverriddenMember
1464 * "interfaceMembers": optional List<OverriddenMember> 1464 * "interfaceMembers": optional List<OverriddenMember>
1465 * } 1465 * }
1466 */ 1466 */
1467 final Matcher isOverride = new MatchesJsonObject( 1467 final Matcher isOverride = new LazyMatcher(() => new MatchesJsonObject(
1468 "Override", { 1468 "Override", {
1469 "offset": isInt, 1469 "offset": isInt,
1470 "length": isInt 1470 "length": isInt
1471 }, optionalFields: { 1471 }, optionalFields: {
1472 "superclassMember": isOverriddenMember, 1472 "superclassMember": isOverriddenMember,
1473 "interfaceMembers": isListOf(isOverriddenMember) 1473 "interfaceMembers": isListOf(isOverriddenMember)
1474 }); 1474 }));
1475 1475
1476 /** 1476 /**
1477 * OverriddenMember 1477 * OverriddenMember
1478 * 1478 *
1479 * { 1479 * {
1480 * "element": Element 1480 * "element": Element
1481 * "className": String 1481 * "className": String
1482 * } 1482 * }
1483 */ 1483 */
1484 final Matcher isOverriddenMember = new MatchesJsonObject( 1484 final Matcher isOverriddenMember = new LazyMatcher(() => new MatchesJsonObject(
1485 "OverriddenMember", { 1485 "OverriddenMember", {
1486 "element": isElement, 1486 "element": isElement,
1487 "className": isString 1487 "className": isString
1488 }); 1488 }));
1489 1489
1490 /** 1490 /**
1491 * Position 1491 * Position
1492 * 1492 *
1493 * { 1493 * {
1494 * "file": FilePath 1494 * "file": FilePath
1495 * "offset": int 1495 * "offset": int
1496 * } 1496 * }
1497 */ 1497 */
1498 final Matcher isPosition = new MatchesJsonObject( 1498 final Matcher isPosition = new LazyMatcher(() => new MatchesJsonObject(
1499 "Position", { 1499 "Position", {
1500 "file": isFilePath, 1500 "file": isFilePath,
1501 "offset": isInt 1501 "offset": isInt
1502 }); 1502 }));
1503 1503
1504 /** 1504 /**
1505 * RefactoringKind 1505 * RefactoringKind
1506 * 1506 *
1507 * enum { 1507 * enum {
1508 * CONVERT_GETTER_TO_METHOD 1508 * CONVERT_GETTER_TO_METHOD
1509 * CONVERT_METHOD_TO_GETTER 1509 * CONVERT_METHOD_TO_GETTER
1510 * EXTRACT_LOCAL_VARIABLE 1510 * EXTRACT_LOCAL_VARIABLE
1511 * EXTRACT_METHOD 1511 * EXTRACT_METHOD
1512 * INLINE_LOCAL_VARIABLE 1512 * INLINE_LOCAL_VARIABLE
(...skipping 15 matching lines...) Expand all
1528 * RefactoringMethodParameter 1528 * RefactoringMethodParameter
1529 * 1529 *
1530 * { 1530 * {
1531 * "id": optional String 1531 * "id": optional String
1532 * "kind": RefactoringMethodParameterKind 1532 * "kind": RefactoringMethodParameterKind
1533 * "type": String 1533 * "type": String
1534 * "name": String 1534 * "name": String
1535 * "parameters": optional String 1535 * "parameters": optional String
1536 * } 1536 * }
1537 */ 1537 */
1538 final Matcher isRefactoringMethodParameter = new MatchesJsonObject( 1538 final Matcher isRefactoringMethodParameter = new LazyMatcher(() => new MatchesJs onObject(
1539 "RefactoringMethodParameter", { 1539 "RefactoringMethodParameter", {
1540 "kind": isRefactoringMethodParameterKind, 1540 "kind": isRefactoringMethodParameterKind,
1541 "type": isString, 1541 "type": isString,
1542 "name": isString 1542 "name": isString
1543 }, optionalFields: { 1543 }, optionalFields: {
1544 "id": isString, 1544 "id": isString,
1545 "parameters": isString 1545 "parameters": isString
1546 }); 1546 }));
1547 1547
1548 /** 1548 /**
1549 * RefactoringMethodParameterKind 1549 * RefactoringMethodParameterKind
1550 * 1550 *
1551 * enum { 1551 * enum {
1552 * REQUIRED 1552 * REQUIRED
1553 * POSITIONAL 1553 * POSITIONAL
1554 * NAMED 1554 * NAMED
1555 * } 1555 * }
1556 */ 1556 */
1557 final Matcher isRefactoringMethodParameterKind = new MatchesEnum("RefactoringMet hodParameterKind", [ 1557 final Matcher isRefactoringMethodParameterKind = new MatchesEnum("RefactoringMet hodParameterKind", [
1558 "REQUIRED", 1558 "REQUIRED",
1559 "POSITIONAL", 1559 "POSITIONAL",
1560 "NAMED" 1560 "NAMED"
1561 ]); 1561 ]);
1562 1562
1563 /** 1563 /**
1564 * RefactoringProblem 1564 * RefactoringProblem
1565 * 1565 *
1566 * { 1566 * {
1567 * "severity": RefactoringProblemSeverity 1567 * "severity": RefactoringProblemSeverity
1568 * "message": String 1568 * "message": String
1569 * "location": Location 1569 * "location": Location
1570 * } 1570 * }
1571 */ 1571 */
1572 final Matcher isRefactoringProblem = new MatchesJsonObject( 1572 final Matcher isRefactoringProblem = new LazyMatcher(() => new MatchesJsonObject (
1573 "RefactoringProblem", { 1573 "RefactoringProblem", {
1574 "severity": isRefactoringProblemSeverity, 1574 "severity": isRefactoringProblemSeverity,
1575 "message": isString, 1575 "message": isString,
1576 "location": isLocation 1576 "location": isLocation
1577 }); 1577 }));
1578 1578
1579 /** 1579 /**
1580 * RefactoringProblemSeverity 1580 * RefactoringProblemSeverity
1581 * 1581 *
1582 * enum { 1582 * enum {
1583 * INFO 1583 * INFO
1584 * WARNING 1584 * WARNING
1585 * ERROR 1585 * ERROR
1586 * FATAL 1586 * FATAL
1587 * } 1587 * }
1588 */ 1588 */
1589 final Matcher isRefactoringProblemSeverity = new MatchesEnum("RefactoringProblem Severity", [ 1589 final Matcher isRefactoringProblemSeverity = new MatchesEnum("RefactoringProblem Severity", [
1590 "INFO", 1590 "INFO",
1591 "WARNING", 1591 "WARNING",
1592 "ERROR", 1592 "ERROR",
1593 "FATAL" 1593 "FATAL"
1594 ]); 1594 ]);
1595 1595
1596 /** 1596 /**
1597 * RemoveContentOverlay 1597 * RemoveContentOverlay
1598 * 1598 *
1599 * { 1599 * {
1600 * "type": "remove" 1600 * "type": "remove"
1601 * } 1601 * }
1602 */ 1602 */
1603 final Matcher isRemoveContentOverlay = new MatchesJsonObject( 1603 final Matcher isRemoveContentOverlay = new LazyMatcher(() => new MatchesJsonObje ct(
1604 "RemoveContentOverlay", { 1604 "RemoveContentOverlay", {
1605 "type": equals("remove") 1605 "type": equals("remove")
1606 }); 1606 }));
1607 1607
1608 /** 1608 /**
1609 * SearchId 1609 * SearchId
1610 * 1610 *
1611 * String 1611 * String
1612 */ 1612 */
1613 final Matcher isSearchId = isString; 1613 final Matcher isSearchId = isString;
1614 1614
1615 /** 1615 /**
1616 * SearchResult 1616 * SearchResult
1617 * 1617 *
1618 * { 1618 * {
1619 * "location": Location 1619 * "location": Location
1620 * "kind": SearchResultKind 1620 * "kind": SearchResultKind
1621 * "isPotential": bool 1621 * "isPotential": bool
1622 * "path": List<Element> 1622 * "path": List<Element>
1623 * } 1623 * }
1624 */ 1624 */
1625 final Matcher isSearchResult = new MatchesJsonObject( 1625 final Matcher isSearchResult = new LazyMatcher(() => new MatchesJsonObject(
1626 "SearchResult", { 1626 "SearchResult", {
1627 "location": isLocation, 1627 "location": isLocation,
1628 "kind": isSearchResultKind, 1628 "kind": isSearchResultKind,
1629 "isPotential": isBool, 1629 "isPotential": isBool,
1630 "path": isListOf(isElement) 1630 "path": isListOf(isElement)
1631 }); 1631 }));
1632 1632
1633 /** 1633 /**
1634 * SearchResultKind 1634 * SearchResultKind
1635 * 1635 *
1636 * enum { 1636 * enum {
1637 * DECLARATION 1637 * DECLARATION
1638 * INVOCATION 1638 * INVOCATION
1639 * READ 1639 * READ
1640 * READ_WRITE 1640 * READ_WRITE
1641 * REFERENCE 1641 * REFERENCE
(...skipping 23 matching lines...) Expand all
1665 /** 1665 /**
1666 * SourceChange 1666 * SourceChange
1667 * 1667 *
1668 * { 1668 * {
1669 * "message": String 1669 * "message": String
1670 * "edits": List<SourceFileEdit> 1670 * "edits": List<SourceFileEdit>
1671 * "linkedEditGroups": List<LinkedEditGroup> 1671 * "linkedEditGroups": List<LinkedEditGroup>
1672 * "selection": optional Position 1672 * "selection": optional Position
1673 * } 1673 * }
1674 */ 1674 */
1675 final Matcher isSourceChange = new MatchesJsonObject( 1675 final Matcher isSourceChange = new LazyMatcher(() => new MatchesJsonObject(
1676 "SourceChange", { 1676 "SourceChange", {
1677 "message": isString, 1677 "message": isString,
1678 "edits": isListOf(isSourceFileEdit), 1678 "edits": isListOf(isSourceFileEdit),
1679 "linkedEditGroups": isListOf(isLinkedEditGroup) 1679 "linkedEditGroups": isListOf(isLinkedEditGroup)
1680 }, optionalFields: { 1680 }, optionalFields: {
1681 "selection": isPosition 1681 "selection": isPosition
1682 }); 1682 }));
1683 1683
1684 /** 1684 /**
1685 * SourceEdit 1685 * SourceEdit
1686 * 1686 *
1687 * { 1687 * {
1688 * "offset": int 1688 * "offset": int
1689 * "length": int 1689 * "length": int
1690 * "replacement": String 1690 * "replacement": String
1691 * } 1691 * }
1692 */ 1692 */
1693 final Matcher isSourceEdit = new MatchesJsonObject( 1693 final Matcher isSourceEdit = new LazyMatcher(() => new MatchesJsonObject(
1694 "SourceEdit", { 1694 "SourceEdit", {
1695 "offset": isInt, 1695 "offset": isInt,
1696 "length": isInt, 1696 "length": isInt,
1697 "replacement": isString 1697 "replacement": isString
1698 }); 1698 }));
1699 1699
1700 /** 1700 /**
1701 * SourceFileEdit 1701 * SourceFileEdit
1702 * 1702 *
1703 * { 1703 * {
1704 * "file": FilePath 1704 * "file": FilePath
1705 * "edits": List<SourceEdit> 1705 * "edits": List<SourceEdit>
1706 * } 1706 * }
1707 */ 1707 */
1708 final Matcher isSourceFileEdit = new MatchesJsonObject( 1708 final Matcher isSourceFileEdit = new LazyMatcher(() => new MatchesJsonObject(
1709 "SourceFileEdit", { 1709 "SourceFileEdit", {
1710 "file": isFilePath, 1710 "file": isFilePath,
1711 "edits": isListOf(isSourceEdit) 1711 "edits": isListOf(isSourceEdit)
1712 }); 1712 }));
1713 1713
1714 /** 1714 /**
1715 * TypeHierarchyItem 1715 * TypeHierarchyItem
1716 * 1716 *
1717 * { 1717 * {
1718 * "classElement": Element 1718 * "classElement": Element
1719 * "displayName": optional String 1719 * "displayName": optional String
1720 * "memberElement": optional Element 1720 * "memberElement": optional Element
1721 * "superclass": optional int 1721 * "superclass": optional int
1722 * "interfaces": List<int> 1722 * "interfaces": List<int>
1723 * "mixins": List<int> 1723 * "mixins": List<int>
1724 * "subclasses": List<int> 1724 * "subclasses": List<int>
1725 * } 1725 * }
1726 */ 1726 */
1727 final Matcher isTypeHierarchyItem = new MatchesJsonObject( 1727 final Matcher isTypeHierarchyItem = new LazyMatcher(() => new MatchesJsonObject(
1728 "TypeHierarchyItem", { 1728 "TypeHierarchyItem", {
1729 "classElement": isElement, 1729 "classElement": isElement,
1730 "interfaces": isListOf(isInt), 1730 "interfaces": isListOf(isInt),
1731 "mixins": isListOf(isInt), 1731 "mixins": isListOf(isInt),
1732 "subclasses": isListOf(isInt) 1732 "subclasses": isListOf(isInt)
1733 }, optionalFields: { 1733 }, optionalFields: {
1734 "displayName": isString, 1734 "displayName": isString,
1735 "memberElement": isElement, 1735 "memberElement": isElement,
1736 "superclass": isInt 1736 "superclass": isInt
1737 }); 1737 }));
1738 1738
1739 /** 1739 /**
1740 * convertGetterToMethod feedback 1740 * convertGetterToMethod feedback
1741 */ 1741 */
1742 final Matcher isConvertGetterToMethodFeedback = isNull; 1742 final Matcher isConvertGetterToMethodFeedback = isNull;
1743 1743
1744 /** 1744 /**
1745 * convertGetterToMethod options 1745 * convertGetterToMethod options
1746 */ 1746 */
1747 final Matcher isConvertGetterToMethodOptions = isNull; 1747 final Matcher isConvertGetterToMethodOptions = isNull;
(...skipping 10 matching lines...) Expand all
1758 1758
1759 /** 1759 /**
1760 * extractLocalVariable feedback 1760 * extractLocalVariable feedback
1761 * 1761 *
1762 * { 1762 * {
1763 * "names": List<String> 1763 * "names": List<String>
1764 * "offsets": List<int> 1764 * "offsets": List<int>
1765 * "lengths": List<int> 1765 * "lengths": List<int>
1766 * } 1766 * }
1767 */ 1767 */
1768 final Matcher isExtractLocalVariableFeedback = new MatchesJsonObject( 1768 final Matcher isExtractLocalVariableFeedback = new LazyMatcher(() => new Matches JsonObject(
1769 "extractLocalVariable feedback", { 1769 "extractLocalVariable feedback", {
1770 "names": isListOf(isString), 1770 "names": isListOf(isString),
1771 "offsets": isListOf(isInt), 1771 "offsets": isListOf(isInt),
1772 "lengths": isListOf(isInt) 1772 "lengths": isListOf(isInt)
1773 }); 1773 }));
1774 1774
1775 /** 1775 /**
1776 * extractLocalVariable options 1776 * extractLocalVariable options
1777 * 1777 *
1778 * { 1778 * {
1779 * "name": String 1779 * "name": String
1780 * "extractAll": bool 1780 * "extractAll": bool
1781 * } 1781 * }
1782 */ 1782 */
1783 final Matcher isExtractLocalVariableOptions = new MatchesJsonObject( 1783 final Matcher isExtractLocalVariableOptions = new LazyMatcher(() => new MatchesJ sonObject(
1784 "extractLocalVariable options", { 1784 "extractLocalVariable options", {
1785 "name": isString, 1785 "name": isString,
1786 "extractAll": isBool 1786 "extractAll": isBool
1787 }); 1787 }));
1788 1788
1789 /** 1789 /**
1790 * extractMethod feedback 1790 * extractMethod feedback
1791 * 1791 *
1792 * { 1792 * {
1793 * "offset": int 1793 * "offset": int
1794 * "length": int 1794 * "length": int
1795 * "returnType": String 1795 * "returnType": String
1796 * "names": List<String> 1796 * "names": List<String>
1797 * "canCreateGetter": bool 1797 * "canCreateGetter": bool
1798 * "parameters": List<RefactoringMethodParameter> 1798 * "parameters": List<RefactoringMethodParameter>
1799 * "occurrences": int 1799 * "occurrences": int
1800 * "offsets": List<int> 1800 * "offsets": List<int>
1801 * "lengths": List<int> 1801 * "lengths": List<int>
1802 * } 1802 * }
1803 */ 1803 */
1804 final Matcher isExtractMethodFeedback = new MatchesJsonObject( 1804 final Matcher isExtractMethodFeedback = new LazyMatcher(() => new MatchesJsonObj ect(
1805 "extractMethod feedback", { 1805 "extractMethod feedback", {
1806 "offset": isInt, 1806 "offset": isInt,
1807 "length": isInt, 1807 "length": isInt,
1808 "returnType": isString, 1808 "returnType": isString,
1809 "names": isListOf(isString), 1809 "names": isListOf(isString),
1810 "canCreateGetter": isBool, 1810 "canCreateGetter": isBool,
1811 "parameters": isListOf(isRefactoringMethodParameter), 1811 "parameters": isListOf(isRefactoringMethodParameter),
1812 "occurrences": isInt, 1812 "occurrences": isInt,
1813 "offsets": isListOf(isInt), 1813 "offsets": isListOf(isInt),
1814 "lengths": isListOf(isInt) 1814 "lengths": isListOf(isInt)
1815 }); 1815 }));
1816 1816
1817 /** 1817 /**
1818 * extractMethod options 1818 * extractMethod options
1819 * 1819 *
1820 * { 1820 * {
1821 * "returnType": String 1821 * "returnType": String
1822 * "createGetter": bool 1822 * "createGetter": bool
1823 * "name": String 1823 * "name": String
1824 * "parameters": List<RefactoringMethodParameter> 1824 * "parameters": List<RefactoringMethodParameter>
1825 * "extractAll": bool 1825 * "extractAll": bool
1826 * } 1826 * }
1827 */ 1827 */
1828 final Matcher isExtractMethodOptions = new MatchesJsonObject( 1828 final Matcher isExtractMethodOptions = new LazyMatcher(() => new MatchesJsonObje ct(
1829 "extractMethod options", { 1829 "extractMethod options", {
1830 "returnType": isString, 1830 "returnType": isString,
1831 "createGetter": isBool, 1831 "createGetter": isBool,
1832 "name": isString, 1832 "name": isString,
1833 "parameters": isListOf(isRefactoringMethodParameter), 1833 "parameters": isListOf(isRefactoringMethodParameter),
1834 "extractAll": isBool 1834 "extractAll": isBool
1835 }); 1835 }));
1836 1836
1837 /** 1837 /**
1838 * inlineLocalVariable feedback 1838 * inlineLocalVariable feedback
1839 */ 1839 */
1840 final Matcher isInlineLocalVariableFeedback = isNull; 1840 final Matcher isInlineLocalVariableFeedback = isNull;
1841 1841
1842 /** 1842 /**
1843 * inlineLocalVariable options 1843 * inlineLocalVariable options
1844 */ 1844 */
1845 final Matcher isInlineLocalVariableOptions = isNull; 1845 final Matcher isInlineLocalVariableOptions = isNull;
1846 1846
1847 /** 1847 /**
1848 * inlineMethod feedback 1848 * inlineMethod feedback
1849 */ 1849 */
1850 final Matcher isInlineMethodFeedback = isNull; 1850 final Matcher isInlineMethodFeedback = isNull;
1851 1851
1852 /** 1852 /**
1853 * inlineMethod options 1853 * inlineMethod options
1854 * 1854 *
1855 * { 1855 * {
1856 * "deleteSource": bool 1856 * "deleteSource": bool
1857 * "inlineAll": bool 1857 * "inlineAll": bool
1858 * } 1858 * }
1859 */ 1859 */
1860 final Matcher isInlineMethodOptions = new MatchesJsonObject( 1860 final Matcher isInlineMethodOptions = new LazyMatcher(() => new MatchesJsonObjec t(
1861 "inlineMethod options", { 1861 "inlineMethod options", {
1862 "deleteSource": isBool, 1862 "deleteSource": isBool,
1863 "inlineAll": isBool 1863 "inlineAll": isBool
1864 }); 1864 }));
1865 1865
1866 /** 1866 /**
1867 * rename feedback 1867 * rename feedback
1868 * 1868 *
1869 * { 1869 * {
1870 * "offset": int 1870 * "offset": int
1871 * "length": int 1871 * "length": int
1872 * } 1872 * }
1873 */ 1873 */
1874 final Matcher isRenameFeedback = new MatchesJsonObject( 1874 final Matcher isRenameFeedback = new LazyMatcher(() => new MatchesJsonObject(
1875 "rename feedback", { 1875 "rename feedback", {
1876 "offset": isInt, 1876 "offset": isInt,
1877 "length": isInt 1877 "length": isInt
1878 }); 1878 }));
1879 1879
1880 /** 1880 /**
1881 * rename options 1881 * rename options
1882 * 1882 *
1883 * { 1883 * {
1884 * "newName": String 1884 * "newName": String
1885 * } 1885 * }
1886 */ 1886 */
1887 final Matcher isRenameOptions = new MatchesJsonObject( 1887 final Matcher isRenameOptions = new LazyMatcher(() => new MatchesJsonObject(
1888 "rename options", { 1888 "rename options", {
1889 "newName": isString 1889 "newName": isString
1890 }); 1890 }));
1891 1891
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/integration/integration_tests.dart ('k') | pkg/analysis_server/tool/spec/codegen_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698