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

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

Issue 482573004: Change analysis server protocol to omit empty lists when optional. (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 29 matching lines...) Expand all
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": optional List<ServerService>
51 * } 51 * }
52 */ 52 */
53 final Matcher isServerSetSubscriptionsParams = new LazyMatcher(() => new Matches JsonObject( 53 final Matcher isServerSetSubscriptionsParams = new LazyMatcher(() => new Matches JsonObject(
54 "server.setSubscriptions params", { 54 "server.setSubscriptions params", null, optionalFields: {
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
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 */ 102 */
103 final Matcher isAnalysisGetErrorsParams = new LazyMatcher(() => new MatchesJsonO bject( 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": optional List<AnalysisError>
113 * } 113 * }
114 */ 114 */
115 final Matcher isAnalysisGetErrorsResult = new LazyMatcher(() => new MatchesJsonO bject( 115 final Matcher isAnalysisGetErrorsResult = new LazyMatcher(() => new MatchesJsonO bject(
116 "analysis.getErrors result", { 116 "analysis.getErrors result", null, optionalFields: {
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 LazyMatcher(() => new MatchesJsonOb ject( 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": optional List<HoverInformation>
139 * } 139 * }
140 */ 140 */
141 final Matcher isAnalysisGetHoverResult = new LazyMatcher(() => new MatchesJsonOb ject( 141 final Matcher isAnalysisGetHoverResult = new LazyMatcher(() => new MatchesJsonOb ject(
142 "analysis.getHover result", { 142 "analysis.getHover result", null, optionalFields: {
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": optional List<FilePath>
161 * "excluded": List<FilePath> 161 * "excluded": optional List<FilePath>
162 * } 162 * }
163 */ 163 */
164 final Matcher isAnalysisSetAnalysisRootsParams = new LazyMatcher(() => new Match esJsonObject( 164 final Matcher isAnalysisSetAnalysisRootsParams = new LazyMatcher(() => new Match esJsonObject(
165 "analysis.setAnalysisRoots params", { 165 "analysis.setAnalysisRoots params", null, optionalFields: {
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": optional List<FilePath>
180 * } 180 * }
181 */ 181 */
182 final Matcher isAnalysisSetPriorityFilesParams = new LazyMatcher(() => new Match esJsonObject( 182 final Matcher isAnalysisSetPriorityFilesParams = new LazyMatcher(() => new Match esJsonObject(
183 "analysis.setPriorityFiles params", { 183 "analysis.setPriorityFiles params", null, optionalFields: {
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
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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": optional List<AnalysisError>
249 * } 249 * }
250 */ 250 */
251 final Matcher isAnalysisErrorsParams = new LazyMatcher(() => new MatchesJsonObje ct( 251 final Matcher isAnalysisErrorsParams = new LazyMatcher(() => new MatchesJsonObje ct(
252 "analysis.errors params", { 252 "analysis.errors params", {
253 "file": isFilePath, 253 "file": isFilePath
254 }, optionalFields: {
254 "errors": isListOf(isAnalysisError) 255 "errors": isListOf(isAnalysisError)
255 })); 256 }));
256 257
257 /** 258 /**
258 * analysis.flushResults params 259 * analysis.flushResults params
259 * 260 *
260 * { 261 * {
261 * "files": List<FilePath> 262 * "files": optional List<FilePath>
262 * } 263 * }
263 */ 264 */
264 final Matcher isAnalysisFlushResultsParams = new LazyMatcher(() => new MatchesJs onObject( 265 final Matcher isAnalysisFlushResultsParams = new LazyMatcher(() => new MatchesJs onObject(
265 "analysis.flushResults params", { 266 "analysis.flushResults params", null, optionalFields: {
266 "files": isListOf(isFilePath) 267 "files": isListOf(isFilePath)
267 })); 268 }));
268 269
269 /** 270 /**
270 * analysis.folding params 271 * analysis.folding params
271 * 272 *
272 * { 273 * {
273 * "file": FilePath 274 * "file": FilePath
274 * "regions": List<FoldingRegion> 275 * "regions": optional List<FoldingRegion>
275 * } 276 * }
276 */ 277 */
277 final Matcher isAnalysisFoldingParams = new LazyMatcher(() => new MatchesJsonObj ect( 278 final Matcher isAnalysisFoldingParams = new LazyMatcher(() => new MatchesJsonObj ect(
278 "analysis.folding params", { 279 "analysis.folding params", {
279 "file": isFilePath, 280 "file": isFilePath
281 }, optionalFields: {
280 "regions": isListOf(isFoldingRegion) 282 "regions": isListOf(isFoldingRegion)
281 })); 283 }));
282 284
283 /** 285 /**
284 * analysis.highlights params 286 * analysis.highlights params
285 * 287 *
286 * { 288 * {
287 * "file": FilePath 289 * "file": FilePath
288 * "regions": List<HighlightRegion> 290 * "regions": optional List<HighlightRegion>
289 * } 291 * }
290 */ 292 */
291 final Matcher isAnalysisHighlightsParams = new LazyMatcher(() => new MatchesJson Object( 293 final Matcher isAnalysisHighlightsParams = new LazyMatcher(() => new MatchesJson Object(
292 "analysis.highlights params", { 294 "analysis.highlights params", {
293 "file": isFilePath, 295 "file": isFilePath
296 }, optionalFields: {
294 "regions": isListOf(isHighlightRegion) 297 "regions": isListOf(isHighlightRegion)
295 })); 298 }));
296 299
297 /** 300 /**
298 * analysis.navigation params 301 * analysis.navigation params
299 * 302 *
300 * { 303 * {
301 * "file": FilePath 304 * "file": FilePath
302 * "regions": List<NavigationRegion> 305 * "regions": optional List<NavigationRegion>
303 * } 306 * }
304 */ 307 */
305 final Matcher isAnalysisNavigationParams = new LazyMatcher(() => new MatchesJson Object( 308 final Matcher isAnalysisNavigationParams = new LazyMatcher(() => new MatchesJson Object(
306 "analysis.navigation params", { 309 "analysis.navigation params", {
307 "file": isFilePath, 310 "file": isFilePath
311 }, optionalFields: {
308 "regions": isListOf(isNavigationRegion) 312 "regions": isListOf(isNavigationRegion)
309 })); 313 }));
310 314
311 /** 315 /**
312 * analysis.occurrences params 316 * analysis.occurrences params
313 * 317 *
314 * { 318 * {
315 * "file": FilePath 319 * "file": FilePath
316 * "occurrences": List<Occurrences> 320 * "occurrences": optional List<Occurrences>
317 * } 321 * }
318 */ 322 */
319 final Matcher isAnalysisOccurrencesParams = new LazyMatcher(() => new MatchesJso nObject( 323 final Matcher isAnalysisOccurrencesParams = new LazyMatcher(() => new MatchesJso nObject(
320 "analysis.occurrences params", { 324 "analysis.occurrences params", {
321 "file": isFilePath, 325 "file": isFilePath
326 }, optionalFields: {
322 "occurrences": isListOf(isOccurrences) 327 "occurrences": isListOf(isOccurrences)
323 })); 328 }));
324 329
325 /** 330 /**
326 * analysis.outline params 331 * analysis.outline params
327 * 332 *
328 * { 333 * {
329 * "file": FilePath 334 * "file": FilePath
330 * "outline": Outline 335 * "outline": Outline
331 * } 336 * }
332 */ 337 */
333 final Matcher isAnalysisOutlineParams = new LazyMatcher(() => new MatchesJsonObj ect( 338 final Matcher isAnalysisOutlineParams = new LazyMatcher(() => new MatchesJsonObj ect(
334 "analysis.outline params", { 339 "analysis.outline params", {
335 "file": isFilePath, 340 "file": isFilePath,
336 "outline": isOutline 341 "outline": isOutline
337 })); 342 }));
338 343
339 /** 344 /**
340 * analysis.overrides params 345 * analysis.overrides params
341 * 346 *
342 * { 347 * {
343 * "file": FilePath 348 * "file": FilePath
344 * "overrides": List<Override> 349 * "overrides": optional List<Override>
345 * } 350 * }
346 */ 351 */
347 final Matcher isAnalysisOverridesParams = new LazyMatcher(() => new MatchesJsonO bject( 352 final Matcher isAnalysisOverridesParams = new LazyMatcher(() => new MatchesJsonO bject(
348 "analysis.overrides params", { 353 "analysis.overrides params", {
349 "file": isFilePath, 354 "file": isFilePath
355 }, optionalFields: {
350 "overrides": isListOf(isOverride) 356 "overrides": isListOf(isOverride)
351 })); 357 }));
352 358
353 /** 359 /**
354 * completion.getSuggestions params 360 * completion.getSuggestions params
355 * 361 *
356 * { 362 * {
357 * "file": FilePath 363 * "file": FilePath
358 * "offset": int 364 * "offset": int
359 * } 365 * }
(...skipping 16 matching lines...) Expand all
376 "id": isCompletionId 382 "id": isCompletionId
377 })); 383 }));
378 384
379 /** 385 /**
380 * completion.results params 386 * completion.results params
381 * 387 *
382 * { 388 * {
383 * "id": CompletionId 389 * "id": CompletionId
384 * "replacementOffset": int 390 * "replacementOffset": int
385 * "replacementLength": int 391 * "replacementLength": int
386 * "results": List<CompletionSuggestion> 392 * "results": optional List<CompletionSuggestion>
387 * "last": bool 393 * "last": bool
388 * } 394 * }
389 */ 395 */
390 final Matcher isCompletionResultsParams = new LazyMatcher(() => new MatchesJsonO bject( 396 final Matcher isCompletionResultsParams = new LazyMatcher(() => new MatchesJsonO bject(
391 "completion.results params", { 397 "completion.results params", {
392 "id": isCompletionId, 398 "id": isCompletionId,
393 "replacementOffset": isInt, 399 "replacementOffset": isInt,
394 "replacementLength": isInt, 400 "replacementLength": isInt,
395 "results": isListOf(isCompletionSuggestion),
396 "last": isBool 401 "last": isBool
402 }, optionalFields: {
403 "results": isListOf(isCompletionSuggestion)
397 })); 404 }));
398 405
399 /** 406 /**
400 * search.findElementReferences params 407 * search.findElementReferences params
401 * 408 *
402 * { 409 * {
403 * "file": FilePath 410 * "file": FilePath
404 * "offset": int 411 * "offset": int
405 * "includePotential": bool 412 * "includePotential": bool
406 * } 413 * }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 final Matcher isSearchGetTypeHierarchyResult = new LazyMatcher(() => new Matches JsonObject( 530 final Matcher isSearchGetTypeHierarchyResult = new LazyMatcher(() => new Matches JsonObject(
524 "search.getTypeHierarchy result", null, optionalFields: { 531 "search.getTypeHierarchy result", null, optionalFields: {
525 "hierarchyItems": isListOf(isTypeHierarchyItem) 532 "hierarchyItems": isListOf(isTypeHierarchyItem)
526 })); 533 }));
527 534
528 /** 535 /**
529 * search.results params 536 * search.results params
530 * 537 *
531 * { 538 * {
532 * "id": SearchId 539 * "id": SearchId
533 * "results": List<SearchResult> 540 * "results": optional List<SearchResult>
534 * "last": bool 541 * "last": bool
535 * } 542 * }
536 */ 543 */
537 final Matcher isSearchResultsParams = new LazyMatcher(() => new MatchesJsonObjec t( 544 final Matcher isSearchResultsParams = new LazyMatcher(() => new MatchesJsonObjec t(
538 "search.results params", { 545 "search.results params", {
539 "id": isSearchId, 546 "id": isSearchId,
540 "results": isListOf(isSearchResult),
541 "last": isBool 547 "last": isBool
548 }, optionalFields: {
549 "results": isListOf(isSearchResult)
542 })); 550 }));
543 551
544 /** 552 /**
545 * edit.getAssists params 553 * edit.getAssists params
546 * 554 *
547 * { 555 * {
548 * "file": FilePath 556 * "file": FilePath
549 * "offset": int 557 * "offset": int
550 * "length": int 558 * "length": int
551 * } 559 * }
552 */ 560 */
553 final Matcher isEditGetAssistsParams = new LazyMatcher(() => new MatchesJsonObje ct( 561 final Matcher isEditGetAssistsParams = new LazyMatcher(() => new MatchesJsonObje ct(
554 "edit.getAssists params", { 562 "edit.getAssists params", {
555 "file": isFilePath, 563 "file": isFilePath,
556 "offset": isInt, 564 "offset": isInt,
557 "length": isInt 565 "length": isInt
558 })); 566 }));
559 567
560 /** 568 /**
561 * edit.getAssists result 569 * edit.getAssists result
562 * 570 *
563 * { 571 * {
564 * "assists": List<SourceChange> 572 * "assists": optional List<SourceChange>
565 * } 573 * }
566 */ 574 */
567 final Matcher isEditGetAssistsResult = new LazyMatcher(() => new MatchesJsonObje ct( 575 final Matcher isEditGetAssistsResult = new LazyMatcher(() => new MatchesJsonObje ct(
568 "edit.getAssists result", { 576 "edit.getAssists result", null, optionalFields: {
569 "assists": isListOf(isSourceChange) 577 "assists": isListOf(isSourceChange)
570 })); 578 }));
571 579
572 /** 580 /**
573 * edit.getAvailableRefactorings params 581 * edit.getAvailableRefactorings params
574 * 582 *
575 * { 583 * {
576 * "file": FilePath 584 * "file": FilePath
577 * "offset": int 585 * "offset": int
578 * "length": int 586 * "length": int
579 * } 587 * }
580 */ 588 */
581 final Matcher isEditGetAvailableRefactoringsParams = new LazyMatcher(() => new M atchesJsonObject( 589 final Matcher isEditGetAvailableRefactoringsParams = new LazyMatcher(() => new M atchesJsonObject(
582 "edit.getAvailableRefactorings params", { 590 "edit.getAvailableRefactorings params", {
583 "file": isFilePath, 591 "file": isFilePath,
584 "offset": isInt, 592 "offset": isInt,
585 "length": isInt 593 "length": isInt
586 })); 594 }));
587 595
588 /** 596 /**
589 * edit.getAvailableRefactorings result 597 * edit.getAvailableRefactorings result
590 * 598 *
591 * { 599 * {
592 * "kinds": List<RefactoringKind> 600 * "kinds": optional List<RefactoringKind>
593 * } 601 * }
594 */ 602 */
595 final Matcher isEditGetAvailableRefactoringsResult = new LazyMatcher(() => new M atchesJsonObject( 603 final Matcher isEditGetAvailableRefactoringsResult = new LazyMatcher(() => new M atchesJsonObject(
596 "edit.getAvailableRefactorings result", { 604 "edit.getAvailableRefactorings result", null, optionalFields: {
597 "kinds": isListOf(isRefactoringKind) 605 "kinds": isListOf(isRefactoringKind)
598 })); 606 }));
599 607
600 /** 608 /**
601 * edit.getFixes params 609 * edit.getFixes params
602 * 610 *
603 * { 611 * {
604 * "file": FilePath 612 * "file": FilePath
605 * "offset": int 613 * "offset": int
606 * } 614 * }
607 */ 615 */
608 final Matcher isEditGetFixesParams = new LazyMatcher(() => new MatchesJsonObject ( 616 final Matcher isEditGetFixesParams = new LazyMatcher(() => new MatchesJsonObject (
609 "edit.getFixes params", { 617 "edit.getFixes params", {
610 "file": isFilePath, 618 "file": isFilePath,
611 "offset": isInt 619 "offset": isInt
612 })); 620 }));
613 621
614 /** 622 /**
615 * edit.getFixes result 623 * edit.getFixes result
616 * 624 *
617 * { 625 * {
618 * "fixes": List<ErrorFixes> 626 * "fixes": optional List<ErrorFixes>
619 * } 627 * }
620 */ 628 */
621 final Matcher isEditGetFixesResult = new LazyMatcher(() => new MatchesJsonObject ( 629 final Matcher isEditGetFixesResult = new LazyMatcher(() => new MatchesJsonObject (
622 "edit.getFixes result", { 630 "edit.getFixes result", null, optionalFields: {
623 "fixes": isListOf(isErrorFixes) 631 "fixes": isListOf(isErrorFixes)
624 })); 632 }));
625 633
626 /** 634 /**
627 * edit.getRefactoring params 635 * edit.getRefactoring params
628 * 636 *
629 * { 637 * {
630 * "kind": RefactoringKind 638 * "kind": RefactoringKind
631 * "file": FilePath 639 * "file": FilePath
632 * "offset": int 640 * "offset": int
(...skipping 10 matching lines...) Expand all
643 "length": isInt, 651 "length": isInt,
644 "validateOnly": isBool 652 "validateOnly": isBool
645 }, optionalFields: { 653 }, optionalFields: {
646 "options": isObject 654 "options": isObject
647 })); 655 }));
648 656
649 /** 657 /**
650 * edit.getRefactoring result 658 * edit.getRefactoring result
651 * 659 *
652 * { 660 * {
653 * "status": List<RefactoringProblem> 661 * "status": optional List<RefactoringProblem>
654 * "feedback": optional object 662 * "feedback": optional object
655 * "change": optional SourceChange 663 * "change": optional SourceChange
656 * "potentialEdits": optional List<String> 664 * "potentialEdits": optional List<String>
657 * } 665 * }
658 */ 666 */
659 final Matcher isEditGetRefactoringResult = new LazyMatcher(() => new MatchesJson Object( 667 final Matcher isEditGetRefactoringResult = new LazyMatcher(() => new MatchesJson Object(
660 "edit.getRefactoring result", { 668 "edit.getRefactoring result", null, optionalFields: {
661 "status": isListOf(isRefactoringProblem) 669 "status": isListOf(isRefactoringProblem),
662 }, optionalFields: {
663 "feedback": isObject, 670 "feedback": isObject,
664 "change": isSourceChange, 671 "change": isSourceChange,
665 "potentialEdits": isListOf(isString) 672 "potentialEdits": isListOf(isString)
666 })); 673 }));
667 674
668 /** 675 /**
669 * debug.createContext params 676 * debug.createContext params
670 * 677 *
671 * { 678 * {
672 * "contextRoot": FilePath 679 * "contextRoot": FilePath
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 final Matcher isDebugMapUriResult = new LazyMatcher(() => new MatchesJsonObject( 741 final Matcher isDebugMapUriResult = new LazyMatcher(() => new MatchesJsonObject(
735 "debug.mapUri result", null, optionalFields: { 742 "debug.mapUri result", null, optionalFields: {
736 "file": isFilePath, 743 "file": isFilePath,
737 "uri": isString 744 "uri": isString
738 })); 745 }));
739 746
740 /** 747 /**
741 * debug.setSubscriptions params 748 * debug.setSubscriptions params
742 * 749 *
743 * { 750 * {
744 * "subscriptions": List<DebugService> 751 * "subscriptions": optional List<DebugService>
745 * } 752 * }
746 */ 753 */
747 final Matcher isDebugSetSubscriptionsParams = new LazyMatcher(() => new MatchesJ sonObject( 754 final Matcher isDebugSetSubscriptionsParams = new LazyMatcher(() => new MatchesJ sonObject(
748 "debug.setSubscriptions params", { 755 "debug.setSubscriptions params", null, optionalFields: {
749 "subscriptions": isListOf(isDebugService) 756 "subscriptions": isListOf(isDebugService)
750 })); 757 }));
751 758
752 /** 759 /**
753 * debug.setSubscriptions result 760 * debug.setSubscriptions result
754 */ 761 */
755 final Matcher isDebugSetSubscriptionsResult = isNull; 762 final Matcher isDebugSetSubscriptionsResult = isNull;
756 763
757 /** 764 /**
758 * debug.launchData params 765 * debug.launchData params
759 * 766 *
760 * { 767 * {
761 * "executables": List<ExecutableFile> 768 * "executables": optional List<ExecutableFile>
762 * "dartToHtml": Map<FilePath, List<FilePath>> 769 * "dartToHtml": Map<FilePath, List<FilePath>>
763 * "htmlToDart": Map<FilePath, List<FilePath>> 770 * "htmlToDart": Map<FilePath, List<FilePath>>
764 * } 771 * }
765 */ 772 */
766 final Matcher isDebugLaunchDataParams = new LazyMatcher(() => new MatchesJsonObj ect( 773 final Matcher isDebugLaunchDataParams = new LazyMatcher(() => new MatchesJsonObj ect(
767 "debug.launchData params", { 774 "debug.launchData params", {
768 "executables": isListOf(isExecutableFile),
769 "dartToHtml": isMapOf(isFilePath, isListOf(isFilePath)), 775 "dartToHtml": isMapOf(isFilePath, isListOf(isFilePath)),
770 "htmlToDart": isMapOf(isFilePath, isListOf(isFilePath)) 776 "htmlToDart": isMapOf(isFilePath, isListOf(isFilePath))
777 }, optionalFields: {
778 "executables": isListOf(isExecutableFile)
771 })); 779 }));
772 780
773 /** 781 /**
774 * AddContentOverlay 782 * AddContentOverlay
775 * 783 *
776 * { 784 * {
777 * "type": "add" 785 * "type": "add"
778 * "content": String 786 * "content": String
779 * } 787 * }
780 */ 788 */
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 "analyzing": isBool 867 "analyzing": isBool
860 }, optionalFields: { 868 }, optionalFields: {
861 "analysisTarget": isString 869 "analysisTarget": isString
862 })); 870 }));
863 871
864 /** 872 /**
865 * ChangeContentOverlay 873 * ChangeContentOverlay
866 * 874 *
867 * { 875 * {
868 * "type": "change" 876 * "type": "change"
869 * "edits": List<SourceEdit> 877 * "edits": optional List<SourceEdit>
870 * } 878 * }
871 */ 879 */
872 final Matcher isChangeContentOverlay = new LazyMatcher(() => new MatchesJsonObje ct( 880 final Matcher isChangeContentOverlay = new LazyMatcher(() => new MatchesJsonObje ct(
873 "ChangeContentOverlay", { 881 "ChangeContentOverlay", {
874 "type": equals("change"), 882 "type": equals("change")
883 }, optionalFields: {
875 "edits": isListOf(isSourceEdit) 884 "edits": isListOf(isSourceEdit)
876 })); 885 }));
877 886
878 /** 887 /**
879 * CompletionId 888 * CompletionId
880 * 889 *
881 * String 890 * String
882 */ 891 */
883 final Matcher isCompletionId = isString; 892 final Matcher isCompletionId = isString;
884 893
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 "message": isString 1101 "message": isString
1093 }, optionalFields: { 1102 }, optionalFields: {
1094 "data": isObject 1103 "data": isObject
1095 })); 1104 }));
1096 1105
1097 /** 1106 /**
1098 * ErrorFixes 1107 * ErrorFixes
1099 * 1108 *
1100 * { 1109 * {
1101 * "error": AnalysisError 1110 * "error": AnalysisError
1102 * "fixes": List<SourceChange> 1111 * "fixes": optional List<SourceChange>
1103 * } 1112 * }
1104 */ 1113 */
1105 final Matcher isErrorFixes = new LazyMatcher(() => new MatchesJsonObject( 1114 final Matcher isErrorFixes = new LazyMatcher(() => new MatchesJsonObject(
1106 "ErrorFixes", { 1115 "ErrorFixes", {
1107 "error": isAnalysisError, 1116 "error": isAnalysisError
1117 }, optionalFields: {
1108 "fixes": isListOf(isSourceChange) 1118 "fixes": isListOf(isSourceChange)
1109 })); 1119 }));
1110 1120
1111 /** 1121 /**
1112 * ErrorSeverity 1122 * ErrorSeverity
1113 * 1123 *
1114 * enum { 1124 * enum {
1115 * INFO 1125 * INFO
1116 * WARNING 1126 * WARNING
1117 * ERROR 1127 * ERROR
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 "elementKind": isString, 1348 "elementKind": isString,
1339 "parameter": isString, 1349 "parameter": isString,
1340 "propagatedType": isString, 1350 "propagatedType": isString,
1341 "staticType": isString 1351 "staticType": isString
1342 })); 1352 }));
1343 1353
1344 /** 1354 /**
1345 * LinkedEditGroup 1355 * LinkedEditGroup
1346 * 1356 *
1347 * { 1357 * {
1348 * "positions": List<Position> 1358 * "positions": optional List<Position>
1349 * "length": int 1359 * "length": int
1350 * "suggestions": List<LinkedEditSuggestion> 1360 * "suggestions": optional List<LinkedEditSuggestion>
1351 * } 1361 * }
1352 */ 1362 */
1353 final Matcher isLinkedEditGroup = new LazyMatcher(() => new MatchesJsonObject( 1363 final Matcher isLinkedEditGroup = new LazyMatcher(() => new MatchesJsonObject(
1354 "LinkedEditGroup", { 1364 "LinkedEditGroup", {
1365 "length": isInt
1366 }, optionalFields: {
1355 "positions": isListOf(isPosition), 1367 "positions": isListOf(isPosition),
1356 "length": isInt,
1357 "suggestions": isListOf(isLinkedEditSuggestion) 1368 "suggestions": isListOf(isLinkedEditSuggestion)
1358 })); 1369 }));
1359 1370
1360 /** 1371 /**
1361 * LinkedEditSuggestion 1372 * LinkedEditSuggestion
1362 * 1373 *
1363 * { 1374 * {
1364 * "value": String 1375 * "value": String
1365 * "kind": LinkedEditSuggestionKind 1376 * "kind": LinkedEditSuggestionKind
1366 * } 1377 * }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 "startLine": isInt, 1418 "startLine": isInt,
1408 "startColumn": isInt 1419 "startColumn": isInt
1409 })); 1420 }));
1410 1421
1411 /** 1422 /**
1412 * NavigationRegion 1423 * NavigationRegion
1413 * 1424 *
1414 * { 1425 * {
1415 * "offset": int 1426 * "offset": int
1416 * "length": int 1427 * "length": int
1417 * "targets": List<Element> 1428 * "targets": optional List<Element>
1418 * } 1429 * }
1419 */ 1430 */
1420 final Matcher isNavigationRegion = new LazyMatcher(() => new MatchesJsonObject( 1431 final Matcher isNavigationRegion = new LazyMatcher(() => new MatchesJsonObject(
1421 "NavigationRegion", { 1432 "NavigationRegion", {
1422 "offset": isInt, 1433 "offset": isInt,
1423 "length": isInt, 1434 "length": isInt
1435 }, optionalFields: {
1424 "targets": isListOf(isElement) 1436 "targets": isListOf(isElement)
1425 })); 1437 }));
1426 1438
1427 /** 1439 /**
1428 * Occurrences 1440 * Occurrences
1429 * 1441 *
1430 * { 1442 * {
1431 * "element": Element 1443 * "element": Element
1432 * "offsets": List<int> 1444 * "offsets": optional List<int>
1433 * "length": int 1445 * "length": int
1434 * } 1446 * }
1435 */ 1447 */
1436 final Matcher isOccurrences = new LazyMatcher(() => new MatchesJsonObject( 1448 final Matcher isOccurrences = new LazyMatcher(() => new MatchesJsonObject(
1437 "Occurrences", { 1449 "Occurrences", {
1438 "element": isElement, 1450 "element": isElement,
1439 "offsets": isListOf(isInt),
1440 "length": isInt 1451 "length": isInt
1452 }, optionalFields: {
1453 "offsets": isListOf(isInt)
1441 })); 1454 }));
1442 1455
1443 /** 1456 /**
1444 * Outline 1457 * Outline
1445 * 1458 *
1446 * { 1459 * {
1447 * "element": Element 1460 * "element": Element
1448 * "offset": int 1461 * "offset": int
1449 * "length": int 1462 * "length": int
1450 * "children": optional List<Outline> 1463 * "children": optional List<Outline>
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 */ 1631 */
1619 final Matcher isSearchId = isString; 1632 final Matcher isSearchId = isString;
1620 1633
1621 /** 1634 /**
1622 * SearchResult 1635 * SearchResult
1623 * 1636 *
1624 * { 1637 * {
1625 * "location": Location 1638 * "location": Location
1626 * "kind": SearchResultKind 1639 * "kind": SearchResultKind
1627 * "isPotential": bool 1640 * "isPotential": bool
1628 * "path": List<Element> 1641 * "path": optional List<Element>
1629 * } 1642 * }
1630 */ 1643 */
1631 final Matcher isSearchResult = new LazyMatcher(() => new MatchesJsonObject( 1644 final Matcher isSearchResult = new LazyMatcher(() => new MatchesJsonObject(
1632 "SearchResult", { 1645 "SearchResult", {
1633 "location": isLocation, 1646 "location": isLocation,
1634 "kind": isSearchResultKind, 1647 "kind": isSearchResultKind,
1635 "isPotential": isBool, 1648 "isPotential": isBool
1649 }, optionalFields: {
1636 "path": isListOf(isElement) 1650 "path": isListOf(isElement)
1637 })); 1651 }));
1638 1652
1639 /** 1653 /**
1640 * SearchResultKind 1654 * SearchResultKind
1641 * 1655 *
1642 * enum { 1656 * enum {
1643 * DECLARATION 1657 * DECLARATION
1644 * INVOCATION 1658 * INVOCATION
1645 * READ 1659 * READ
(...skipping 22 matching lines...) Expand all
1668 */ 1682 */
1669 final Matcher isServerService = new MatchesEnum("ServerService", [ 1683 final Matcher isServerService = new MatchesEnum("ServerService", [
1670 "STATUS" 1684 "STATUS"
1671 ]); 1685 ]);
1672 1686
1673 /** 1687 /**
1674 * SourceChange 1688 * SourceChange
1675 * 1689 *
1676 * { 1690 * {
1677 * "message": String 1691 * "message": String
1678 * "edits": List<SourceFileEdit> 1692 * "edits": optional List<SourceFileEdit>
1679 * "linkedEditGroups": List<LinkedEditGroup> 1693 * "linkedEditGroups": optional List<LinkedEditGroup>
1680 * "selection": optional Position 1694 * "selection": optional Position
1681 * } 1695 * }
1682 */ 1696 */
1683 final Matcher isSourceChange = new LazyMatcher(() => new MatchesJsonObject( 1697 final Matcher isSourceChange = new LazyMatcher(() => new MatchesJsonObject(
1684 "SourceChange", { 1698 "SourceChange", {
1685 "message": isString, 1699 "message": isString
1700 }, optionalFields: {
1686 "edits": isListOf(isSourceFileEdit), 1701 "edits": isListOf(isSourceFileEdit),
1687 "linkedEditGroups": isListOf(isLinkedEditGroup) 1702 "linkedEditGroups": isListOf(isLinkedEditGroup),
1688 }, optionalFields: {
1689 "selection": isPosition 1703 "selection": isPosition
1690 })); 1704 }));
1691 1705
1692 /** 1706 /**
1693 * SourceEdit 1707 * SourceEdit
1694 * 1708 *
1695 * { 1709 * {
1696 * "offset": int 1710 * "offset": int
1697 * "length": int 1711 * "length": int
1698 * "replacement": String 1712 * "replacement": String
1699 * "id": optional String 1713 * "id": optional String
1700 * } 1714 * }
1701 */ 1715 */
1702 final Matcher isSourceEdit = new LazyMatcher(() => new MatchesJsonObject( 1716 final Matcher isSourceEdit = new LazyMatcher(() => new MatchesJsonObject(
1703 "SourceEdit", { 1717 "SourceEdit", {
1704 "offset": isInt, 1718 "offset": isInt,
1705 "length": isInt, 1719 "length": isInt,
1706 "replacement": isString 1720 "replacement": isString
1707 }, optionalFields: { 1721 }, optionalFields: {
1708 "id": isString 1722 "id": isString
1709 })); 1723 }));
1710 1724
1711 /** 1725 /**
1712 * SourceFileEdit 1726 * SourceFileEdit
1713 * 1727 *
1714 * { 1728 * {
1715 * "file": FilePath 1729 * "file": FilePath
1716 * "edits": List<SourceEdit> 1730 * "edits": optional List<SourceEdit>
1717 * } 1731 * }
1718 */ 1732 */
1719 final Matcher isSourceFileEdit = new LazyMatcher(() => new MatchesJsonObject( 1733 final Matcher isSourceFileEdit = new LazyMatcher(() => new MatchesJsonObject(
1720 "SourceFileEdit", { 1734 "SourceFileEdit", {
1721 "file": isFilePath, 1735 "file": isFilePath
1736 }, optionalFields: {
1722 "edits": isListOf(isSourceEdit) 1737 "edits": isListOf(isSourceEdit)
1723 })); 1738 }));
1724 1739
1725 /** 1740 /**
1726 * TypeHierarchyItem 1741 * TypeHierarchyItem
1727 * 1742 *
1728 * { 1743 * {
1729 * "classElement": Element 1744 * "classElement": Element
1730 * "displayName": optional String 1745 * "displayName": optional String
1731 * "memberElement": optional Element 1746 * "memberElement": optional Element
1732 * "superclass": optional int 1747 * "superclass": optional int
1733 * "interfaces": List<int> 1748 * "interfaces": optional List<int>
1734 * "mixins": List<int> 1749 * "mixins": optional List<int>
1735 * "subclasses": List<int> 1750 * "subclasses": optional List<int>
1736 * } 1751 * }
1737 */ 1752 */
1738 final Matcher isTypeHierarchyItem = new LazyMatcher(() => new MatchesJsonObject( 1753 final Matcher isTypeHierarchyItem = new LazyMatcher(() => new MatchesJsonObject(
1739 "TypeHierarchyItem", { 1754 "TypeHierarchyItem", {
1740 "classElement": isElement, 1755 "classElement": isElement
1756 }, optionalFields: {
1757 "displayName": isString,
1758 "memberElement": isElement,
1759 "superclass": isInt,
1741 "interfaces": isListOf(isInt), 1760 "interfaces": isListOf(isInt),
1742 "mixins": isListOf(isInt), 1761 "mixins": isListOf(isInt),
1743 "subclasses": isListOf(isInt) 1762 "subclasses": isListOf(isInt)
1744 }, optionalFields: {
1745 "displayName": isString,
1746 "memberElement": isElement,
1747 "superclass": isInt
1748 })); 1763 }));
1749 1764
1750 /** 1765 /**
1751 * convertGetterToMethod feedback 1766 * convertGetterToMethod feedback
1752 */ 1767 */
1753 final Matcher isConvertGetterToMethodFeedback = isNull; 1768 final Matcher isConvertGetterToMethodFeedback = isNull;
1754 1769
1755 /** 1770 /**
1756 * convertGetterToMethod options 1771 * convertGetterToMethod options
1757 */ 1772 */
1758 final Matcher isConvertGetterToMethodOptions = isNull; 1773 final Matcher isConvertGetterToMethodOptions = isNull;
1759 1774
1760 /** 1775 /**
1761 * convertMethodToGetter feedback 1776 * convertMethodToGetter feedback
1762 */ 1777 */
1763 final Matcher isConvertMethodToGetterFeedback = isNull; 1778 final Matcher isConvertMethodToGetterFeedback = isNull;
1764 1779
1765 /** 1780 /**
1766 * convertMethodToGetter options 1781 * convertMethodToGetter options
1767 */ 1782 */
1768 final Matcher isConvertMethodToGetterOptions = isNull; 1783 final Matcher isConvertMethodToGetterOptions = isNull;
1769 1784
1770 /** 1785 /**
1771 * extractLocalVariable feedback 1786 * extractLocalVariable feedback
1772 * 1787 *
1773 * { 1788 * {
1774 * "names": List<String> 1789 * "names": optional List<String>
1775 * "offsets": List<int> 1790 * "offsets": optional List<int>
1776 * "lengths": List<int> 1791 * "lengths": optional List<int>
1777 * } 1792 * }
1778 */ 1793 */
1779 final Matcher isExtractLocalVariableFeedback = new LazyMatcher(() => new Matches JsonObject( 1794 final Matcher isExtractLocalVariableFeedback = new LazyMatcher(() => new Matches JsonObject(
1780 "extractLocalVariable feedback", { 1795 "extractLocalVariable feedback", null, optionalFields: {
1781 "names": isListOf(isString), 1796 "names": isListOf(isString),
1782 "offsets": isListOf(isInt), 1797 "offsets": isListOf(isInt),
1783 "lengths": isListOf(isInt) 1798 "lengths": isListOf(isInt)
1784 })); 1799 }));
1785 1800
1786 /** 1801 /**
1787 * extractLocalVariable options 1802 * extractLocalVariable options
1788 * 1803 *
1789 * { 1804 * {
1790 * "name": String 1805 * "name": String
1791 * "extractAll": bool 1806 * "extractAll": bool
1792 * } 1807 * }
1793 */ 1808 */
1794 final Matcher isExtractLocalVariableOptions = new LazyMatcher(() => new MatchesJ sonObject( 1809 final Matcher isExtractLocalVariableOptions = new LazyMatcher(() => new MatchesJ sonObject(
1795 "extractLocalVariable options", { 1810 "extractLocalVariable options", {
1796 "name": isString, 1811 "name": isString,
1797 "extractAll": isBool 1812 "extractAll": isBool
1798 })); 1813 }));
1799 1814
1800 /** 1815 /**
1801 * extractMethod feedback 1816 * extractMethod feedback
1802 * 1817 *
1803 * { 1818 * {
1804 * "offset": int 1819 * "offset": int
1805 * "length": int 1820 * "length": int
1806 * "returnType": String 1821 * "returnType": String
1807 * "names": List<String> 1822 * "names": optional List<String>
1808 * "canCreateGetter": bool 1823 * "canCreateGetter": bool
1809 * "parameters": List<RefactoringMethodParameter> 1824 * "parameters": optional List<RefactoringMethodParameter>
1810 * "occurrences": int 1825 * "occurrences": int
1811 * "offsets": List<int> 1826 * "offsets": optional List<int>
1812 * "lengths": List<int> 1827 * "lengths": optional List<int>
1813 * } 1828 * }
1814 */ 1829 */
1815 final Matcher isExtractMethodFeedback = new LazyMatcher(() => new MatchesJsonObj ect( 1830 final Matcher isExtractMethodFeedback = new LazyMatcher(() => new MatchesJsonObj ect(
1816 "extractMethod feedback", { 1831 "extractMethod feedback", {
1817 "offset": isInt, 1832 "offset": isInt,
1818 "length": isInt, 1833 "length": isInt,
1819 "returnType": isString, 1834 "returnType": isString,
1835 "canCreateGetter": isBool,
1836 "occurrences": isInt
1837 }, optionalFields: {
1820 "names": isListOf(isString), 1838 "names": isListOf(isString),
1821 "canCreateGetter": isBool,
1822 "parameters": isListOf(isRefactoringMethodParameter), 1839 "parameters": isListOf(isRefactoringMethodParameter),
1823 "occurrences": isInt,
1824 "offsets": isListOf(isInt), 1840 "offsets": isListOf(isInt),
1825 "lengths": isListOf(isInt) 1841 "lengths": isListOf(isInt)
1826 })); 1842 }));
1827 1843
1828 /** 1844 /**
1829 * extractMethod options 1845 * extractMethod options
1830 * 1846 *
1831 * { 1847 * {
1832 * "returnType": String 1848 * "returnType": String
1833 * "createGetter": bool 1849 * "createGetter": bool
1834 * "name": String 1850 * "name": String
1835 * "parameters": List<RefactoringMethodParameter> 1851 * "parameters": optional List<RefactoringMethodParameter>
1836 * "extractAll": bool 1852 * "extractAll": bool
1837 * } 1853 * }
1838 */ 1854 */
1839 final Matcher isExtractMethodOptions = new LazyMatcher(() => new MatchesJsonObje ct( 1855 final Matcher isExtractMethodOptions = new LazyMatcher(() => new MatchesJsonObje ct(
1840 "extractMethod options", { 1856 "extractMethod options", {
1841 "returnType": isString, 1857 "returnType": isString,
1842 "createGetter": isBool, 1858 "createGetter": isBool,
1843 "name": isString, 1859 "name": isString,
1844 "parameters": isListOf(isRefactoringMethodParameter),
1845 "extractAll": isBool 1860 "extractAll": isBool
1861 }, optionalFields: {
1862 "parameters": isListOf(isRefactoringMethodParameter)
1846 })); 1863 }));
1847 1864
1848 /** 1865 /**
1849 * inlineLocalVariable feedback 1866 * inlineLocalVariable feedback
1850 */ 1867 */
1851 final Matcher isInlineLocalVariableFeedback = isNull; 1868 final Matcher isInlineLocalVariableFeedback = isNull;
1852 1869
1853 /** 1870 /**
1854 * inlineLocalVariable options 1871 * inlineLocalVariable options
1855 */ 1872 */
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 * 1910 *
1894 * { 1911 * {
1895 * "newName": String 1912 * "newName": String
1896 * } 1913 * }
1897 */ 1914 */
1898 final Matcher isRenameOptions = new LazyMatcher(() => new MatchesJsonObject( 1915 final Matcher isRenameOptions = new LazyMatcher(() => new MatchesJsonObject(
1899 "rename options", { 1916 "rename options", {
1900 "newName": isString 1917 "newName": isString
1901 })); 1918 }));
1902 1919
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698