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

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

Issue 2879273002: Make server use the common protocol classes (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script 6 // To regenerate the file, use the script
7 // "pkg/analysis_server/tool/spec/generate_files". 7 // "pkg/analysis_server/tool/spec/generate_files".
8 8
9 /** 9 /**
10 * Matchers for data types defined in the analysis server API 10 * Matchers for data types defined in the analysis server API
11 */ 11 */
12 import 'package:test/test.dart'; 12 import 'package:test/test.dart';
13 13
14 import 'integration_tests.dart'; 14 import 'integration_tests.dart';
15 15
16 /** 16 /**
17 * server.getVersion params
18 */
19 final Matcher isServerGetVersionParams = isNull;
20
21 /**
22 * server.getVersion result
23 *
24 * {
25 * "version": String
26 * }
27 */
28 final Matcher isServerGetVersionResult = new LazyMatcher(() =>
29 new MatchesJsonObject("server.getVersion result", {"version": isString}));
30
31 /**
32 * server.shutdown params
33 */
34 final Matcher isServerShutdownParams = isNull;
35
36 /**
37 * server.shutdown result
38 */
39 final Matcher isServerShutdownResult = isNull;
40
41 /**
42 * server.setSubscriptions params
43 *
44 * {
45 * "subscriptions": List<ServerService>
46 * }
47 */
48 final Matcher isServerSetSubscriptionsParams = new LazyMatcher(() =>
49 new MatchesJsonObject("server.setSubscriptions params",
50 {"subscriptions": isListOf(isServerService)}));
51
52 /**
53 * server.setSubscriptions result
54 */
55 final Matcher isServerSetSubscriptionsResult = isNull;
56
57 /**
58 * server.connected params
59 *
60 * {
61 * "version": String
62 * "pid": int
63 * "sessionId": optional String
64 * }
65 */
66 final Matcher isServerConnectedParams = new LazyMatcher(() =>
67 new MatchesJsonObject(
68 "server.connected params", {"version": isString, "pid": isInt},
69 optionalFields: {"sessionId": isString}));
70
71 /**
72 * server.error params
73 *
74 * {
75 * "isFatal": bool
76 * "message": String
77 * "stackTrace": String
78 * }
79 */
80 final Matcher isServerErrorParams = new LazyMatcher(() => new MatchesJsonObject(
81 "server.error params",
82 {"isFatal": isBool, "message": isString, "stackTrace": isString}));
83
84 /**
85 * server.status params
86 *
87 * {
88 * "analysis": optional AnalysisStatus
89 * "pub": optional PubStatus
90 * }
91 */
92 final Matcher isServerStatusParams = new LazyMatcher(() =>
93 new MatchesJsonObject("server.status params", null,
94 optionalFields: {"analysis": isAnalysisStatus, "pub": isPubStatus}));
95
96 /**
97 * analysis.getErrors params
98 *
99 * {
100 * "file": FilePath
101 * }
102 */
103 final Matcher isAnalysisGetErrorsParams = new LazyMatcher(() =>
104 new MatchesJsonObject("analysis.getErrors params", {"file": isFilePath}));
105
106 /**
107 * analysis.getErrors result
108 *
109 * {
110 * "errors": List<AnalysisError>
111 * }
112 */
113 final Matcher isAnalysisGetErrorsResult = new LazyMatcher(() =>
114 new MatchesJsonObject(
115 "analysis.getErrors result", {"errors": isListOf(isAnalysisError)}));
116
117 /**
118 * analysis.getHover params
119 *
120 * {
121 * "file": FilePath
122 * "offset": int
123 * }
124 */
125 final Matcher isAnalysisGetHoverParams = new LazyMatcher(() =>
126 new MatchesJsonObject(
127 "analysis.getHover params", {"file": isFilePath, "offset": isInt}));
128
129 /**
130 * analysis.getHover result
131 *
132 * {
133 * "hovers": List<HoverInformation>
134 * }
135 */
136 final Matcher isAnalysisGetHoverResult = new LazyMatcher(() =>
137 new MatchesJsonObject(
138 "analysis.getHover result", {"hovers": isListOf(isHoverInformation)}));
139
140 /**
141 * analysis.getReachableSources params
142 *
143 * {
144 * "file": FilePath
145 * }
146 */
147 final Matcher isAnalysisGetReachableSourcesParams = new LazyMatcher(() =>
148 new MatchesJsonObject(
149 "analysis.getReachableSources params", {"file": isFilePath}));
150
151 /**
152 * analysis.getReachableSources result
153 *
154 * {
155 * "sources": Map<String, List<String>>
156 * }
157 */
158 final Matcher isAnalysisGetReachableSourcesResult = new LazyMatcher(() =>
159 new MatchesJsonObject("analysis.getReachableSources result",
160 {"sources": isMapOf(isString, isListOf(isString))}));
161
162 /**
163 * analysis.getLibraryDependencies params
164 */
165 final Matcher isAnalysisGetLibraryDependenciesParams = isNull;
166
167 /**
168 * analysis.getLibraryDependencies result
169 *
170 * {
171 * "libraries": List<FilePath>
172 * "packageMap": Map<String, Map<String, List<FilePath>>>
173 * }
174 */
175 final Matcher isAnalysisGetLibraryDependenciesResult = new LazyMatcher(
176 () => new MatchesJsonObject("analysis.getLibraryDependencies result", {
177 "libraries": isListOf(isFilePath),
178 "packageMap":
179 isMapOf(isString, isMapOf(isString, isListOf(isFilePath)))
180 }));
181
182 /**
183 * analysis.getNavigation params
184 *
185 * {
186 * "file": FilePath
187 * "offset": int
188 * "length": int
189 * }
190 */
191 final Matcher isAnalysisGetNavigationParams = new LazyMatcher(() =>
192 new MatchesJsonObject("analysis.getNavigation params",
193 {"file": isFilePath, "offset": isInt, "length": isInt}));
194
195 /**
196 * analysis.getNavigation result
197 *
198 * {
199 * "files": List<FilePath>
200 * "targets": List<NavigationTarget>
201 * "regions": List<NavigationRegion>
202 * }
203 */
204 final Matcher isAnalysisGetNavigationResult = new LazyMatcher(
205 () => new MatchesJsonObject("analysis.getNavigation result", {
206 "files": isListOf(isFilePath),
207 "targets": isListOf(isNavigationTarget),
208 "regions": isListOf(isNavigationRegion)
209 }));
210
211 /**
212 * analysis.reanalyze params
213 *
214 * {
215 * "roots": optional List<FilePath>
216 * }
217 */
218 final Matcher isAnalysisReanalyzeParams = new LazyMatcher(() =>
219 new MatchesJsonObject("analysis.reanalyze params", null,
220 optionalFields: {"roots": isListOf(isFilePath)}));
221
222 /**
223 * analysis.reanalyze result
224 */
225 final Matcher isAnalysisReanalyzeResult = isNull;
226
227 /**
228 * analysis.setAnalysisRoots params
229 *
230 * {
231 * "included": List<FilePath>
232 * "excluded": List<FilePath>
233 * "packageRoots": optional Map<FilePath, FilePath>
234 * }
235 */
236 final Matcher isAnalysisSetAnalysisRootsParams = new LazyMatcher(() =>
237 new MatchesJsonObject("analysis.setAnalysisRoots params",
238 {"included": isListOf(isFilePath), "excluded": isListOf(isFilePath)},
239 optionalFields: {"packageRoots": isMapOf(isFilePath, isFilePath)}));
240
241 /**
242 * analysis.setAnalysisRoots result
243 */
244 final Matcher isAnalysisSetAnalysisRootsResult = isNull;
245
246 /**
247 * analysis.setGeneralSubscriptions params
248 *
249 * {
250 * "subscriptions": List<GeneralAnalysisService>
251 * }
252 */
253 final Matcher isAnalysisSetGeneralSubscriptionsParams = new LazyMatcher(() =>
254 new MatchesJsonObject("analysis.setGeneralSubscriptions params",
255 {"subscriptions": isListOf(isGeneralAnalysisService)}));
256
257 /**
258 * analysis.setGeneralSubscriptions result
259 */
260 final Matcher isAnalysisSetGeneralSubscriptionsResult = isNull;
261
262 /**
263 * analysis.setPriorityFiles params
264 *
265 * {
266 * "files": List<FilePath>
267 * }
268 */
269 final Matcher isAnalysisSetPriorityFilesParams = new LazyMatcher(() =>
270 new MatchesJsonObject(
271 "analysis.setPriorityFiles params", {"files": isListOf(isFilePath)}));
272
273 /**
274 * analysis.setPriorityFiles result
275 */
276 final Matcher isAnalysisSetPriorityFilesResult = isNull;
277
278 /**
279 * analysis.setSubscriptions params
280 *
281 * {
282 * "subscriptions": Map<AnalysisService, List<FilePath>>
283 * }
284 */
285 final Matcher isAnalysisSetSubscriptionsParams = new LazyMatcher(() =>
286 new MatchesJsonObject("analysis.setSubscriptions params",
287 {"subscriptions": isMapOf(isAnalysisService, isListOf(isFilePath))}));
288
289 /**
290 * analysis.setSubscriptions result
291 */
292 final Matcher isAnalysisSetSubscriptionsResult = isNull;
293
294 /**
295 * analysis.updateContent params
296 *
297 * {
298 * "files": Map<FilePath, AddContentOverlay | ChangeContentOverlay | RemoveCon tentOverlay>
299 * }
300 */
301 final Matcher isAnalysisUpdateContentParams = new LazyMatcher(
302 () => new MatchesJsonObject("analysis.updateContent params", {
303 "files": isMapOf(
304 isFilePath,
305 isOneOf([
306 isAddContentOverlay,
307 isChangeContentOverlay,
308 isRemoveContentOverlay
309 ]))
310 }));
311
312 /**
313 * analysis.updateContent result
314 *
315 * {
316 * }
317 */
318 final Matcher isAnalysisUpdateContentResult = new LazyMatcher(
319 () => new MatchesJsonObject("analysis.updateContent result", null));
320
321 /**
322 * analysis.updateOptions params
323 *
324 * {
325 * "options": AnalysisOptions
326 * }
327 */
328 final Matcher isAnalysisUpdateOptionsParams = new LazyMatcher(() =>
329 new MatchesJsonObject(
330 "analysis.updateOptions params", {"options": isAnalysisOptions}));
331
332 /**
333 * analysis.updateOptions result
334 */
335 final Matcher isAnalysisUpdateOptionsResult = isNull;
336
337 /**
338 * analysis.analyzedFiles params
339 *
340 * {
341 * "directories": List<FilePath>
342 * }
343 */
344 final Matcher isAnalysisAnalyzedFilesParams = new LazyMatcher(() =>
345 new MatchesJsonObject("analysis.analyzedFiles params",
346 {"directories": isListOf(isFilePath)}));
347
348 /**
349 * analysis.errors params
350 *
351 * {
352 * "file": FilePath
353 * "errors": List<AnalysisError>
354 * }
355 */
356 final Matcher isAnalysisErrorsParams = new LazyMatcher(() =>
357 new MatchesJsonObject("analysis.errors params",
358 {"file": isFilePath, "errors": isListOf(isAnalysisError)}));
359
360 /**
361 * analysis.flushResults params
362 *
363 * {
364 * "files": List<FilePath>
365 * }
366 */
367 final Matcher isAnalysisFlushResultsParams = new LazyMatcher(() =>
368 new MatchesJsonObject(
369 "analysis.flushResults params", {"files": isListOf(isFilePath)}));
370
371 /**
372 * analysis.folding params
373 *
374 * {
375 * "file": FilePath
376 * "regions": List<FoldingRegion>
377 * }
378 */
379 final Matcher isAnalysisFoldingParams = new LazyMatcher(() =>
380 new MatchesJsonObject("analysis.folding params",
381 {"file": isFilePath, "regions": isListOf(isFoldingRegion)}));
382
383 /**
384 * analysis.highlights params
385 *
386 * {
387 * "file": FilePath
388 * "regions": List<HighlightRegion>
389 * }
390 */
391 final Matcher isAnalysisHighlightsParams = new LazyMatcher(() =>
392 new MatchesJsonObject("analysis.highlights params",
393 {"file": isFilePath, "regions": isListOf(isHighlightRegion)}));
394
395 /**
396 * analysis.implemented params
397 *
398 * {
399 * "file": FilePath
400 * "classes": List<ImplementedClass>
401 * "members": List<ImplementedMember>
402 * }
403 */
404 final Matcher isAnalysisImplementedParams =
405 new LazyMatcher(() => new MatchesJsonObject("analysis.implemented params", {
406 "file": isFilePath,
407 "classes": isListOf(isImplementedClass),
408 "members": isListOf(isImplementedMember)
409 }));
410
411 /**
412 * analysis.invalidate params
413 *
414 * {
415 * "file": FilePath
416 * "offset": int
417 * "length": int
418 * "delta": int
419 * }
420 */
421 final Matcher isAnalysisInvalidateParams = new LazyMatcher(() =>
422 new MatchesJsonObject("analysis.invalidate params", {
423 "file": isFilePath,
424 "offset": isInt,
425 "length": isInt,
426 "delta": isInt
427 }));
428
429 /**
430 * analysis.navigation params
431 *
432 * {
433 * "file": FilePath
434 * "regions": List<NavigationRegion>
435 * "targets": List<NavigationTarget>
436 * "files": List<FilePath>
437 * }
438 */
439 final Matcher isAnalysisNavigationParams =
440 new LazyMatcher(() => new MatchesJsonObject("analysis.navigation params", {
441 "file": isFilePath,
442 "regions": isListOf(isNavigationRegion),
443 "targets": isListOf(isNavigationTarget),
444 "files": isListOf(isFilePath)
445 }));
446
447 /**
448 * analysis.occurrences params
449 *
450 * {
451 * "file": FilePath
452 * "occurrences": List<Occurrences>
453 * }
454 */
455 final Matcher isAnalysisOccurrencesParams = new LazyMatcher(() =>
456 new MatchesJsonObject("analysis.occurrences params",
457 {"file": isFilePath, "occurrences": isListOf(isOccurrences)}));
458
459 /**
460 * analysis.outline params
461 *
462 * {
463 * "file": FilePath
464 * "kind": FileKind
465 * "libraryName": optional String
466 * "outline": Outline
467 * }
468 */
469 final Matcher isAnalysisOutlineParams = new LazyMatcher(() =>
470 new MatchesJsonObject("analysis.outline params",
471 {"file": isFilePath, "kind": isFileKind, "outline": isOutline},
472 optionalFields: {"libraryName": isString}));
473
474 /**
475 * analysis.overrides params
476 *
477 * {
478 * "file": FilePath
479 * "overrides": List<Override>
480 * }
481 */
482 final Matcher isAnalysisOverridesParams = new LazyMatcher(() =>
483 new MatchesJsonObject("analysis.overrides params",
484 {"file": isFilePath, "overrides": isListOf(isOverride)}));
485
486 /**
487 * completion.getSuggestions params
488 *
489 * {
490 * "file": FilePath
491 * "offset": int
492 * }
493 */
494 final Matcher isCompletionGetSuggestionsParams = new LazyMatcher(() =>
495 new MatchesJsonObject("completion.getSuggestions params",
496 {"file": isFilePath, "offset": isInt}));
497
498 /**
499 * completion.getSuggestions result
500 *
501 * {
502 * "id": CompletionId
503 * }
504 */
505 final Matcher isCompletionGetSuggestionsResult = new LazyMatcher(() =>
506 new MatchesJsonObject(
507 "completion.getSuggestions result", {"id": isCompletionId}));
508
509 /**
510 * completion.results params
511 *
512 * {
513 * "id": CompletionId
514 * "replacementOffset": int
515 * "replacementLength": int
516 * "results": List<CompletionSuggestion>
517 * "isLast": bool
518 * }
519 */
520 final Matcher isCompletionResultsParams =
521 new LazyMatcher(() => new MatchesJsonObject("completion.results params", {
522 "id": isCompletionId,
523 "replacementOffset": isInt,
524 "replacementLength": isInt,
525 "results": isListOf(isCompletionSuggestion),
526 "isLast": isBool
527 }));
528
529 /**
530 * search.findElementReferences params
531 *
532 * {
533 * "file": FilePath
534 * "offset": int
535 * "includePotential": bool
536 * }
537 */
538 final Matcher isSearchFindElementReferencesParams = new LazyMatcher(() =>
539 new MatchesJsonObject("search.findElementReferences params",
540 {"file": isFilePath, "offset": isInt, "includePotential": isBool}));
541
542 /**
543 * search.findElementReferences result
544 *
545 * {
546 * "id": optional SearchId
547 * "element": optional Element
548 * }
549 */
550 final Matcher isSearchFindElementReferencesResult = new LazyMatcher(() =>
551 new MatchesJsonObject("search.findElementReferences result", null,
552 optionalFields: {"id": isSearchId, "element": isElement}));
553
554 /**
555 * search.findMemberDeclarations params
556 *
557 * {
558 * "name": String
559 * }
560 */
561 final Matcher isSearchFindMemberDeclarationsParams = new LazyMatcher(() =>
562 new MatchesJsonObject(
563 "search.findMemberDeclarations params", {"name": isString}));
564
565 /**
566 * search.findMemberDeclarations result
567 *
568 * {
569 * "id": SearchId
570 * }
571 */
572 final Matcher isSearchFindMemberDeclarationsResult = new LazyMatcher(() =>
573 new MatchesJsonObject(
574 "search.findMemberDeclarations result", {"id": isSearchId}));
575
576 /**
577 * search.findMemberReferences params
578 *
579 * {
580 * "name": String
581 * }
582 */
583 final Matcher isSearchFindMemberReferencesParams = new LazyMatcher(() =>
584 new MatchesJsonObject(
585 "search.findMemberReferences params", {"name": isString}));
586
587 /**
588 * search.findMemberReferences result
589 *
590 * {
591 * "id": SearchId
592 * }
593 */
594 final Matcher isSearchFindMemberReferencesResult = new LazyMatcher(() =>
595 new MatchesJsonObject(
596 "search.findMemberReferences result", {"id": isSearchId}));
597
598 /**
599 * search.findTopLevelDeclarations params
600 *
601 * {
602 * "pattern": String
603 * }
604 */
605 final Matcher isSearchFindTopLevelDeclarationsParams = new LazyMatcher(() =>
606 new MatchesJsonObject(
607 "search.findTopLevelDeclarations params", {"pattern": isString}));
608
609 /**
610 * search.findTopLevelDeclarations result
611 *
612 * {
613 * "id": SearchId
614 * }
615 */
616 final Matcher isSearchFindTopLevelDeclarationsResult = new LazyMatcher(() =>
617 new MatchesJsonObject(
618 "search.findTopLevelDeclarations result", {"id": isSearchId}));
619
620 /**
621 * search.getTypeHierarchy params
622 *
623 * {
624 * "file": FilePath
625 * "offset": int
626 * "superOnly": optional bool
627 * }
628 */
629 final Matcher isSearchGetTypeHierarchyParams = new LazyMatcher(() =>
630 new MatchesJsonObject(
631 "search.getTypeHierarchy params", {"file": isFilePath, "offset": isInt},
632 optionalFields: {"superOnly": isBool}));
633
634 /**
635 * search.getTypeHierarchy result
636 *
637 * {
638 * "hierarchyItems": optional List<TypeHierarchyItem>
639 * }
640 */
641 final Matcher isSearchGetTypeHierarchyResult = new LazyMatcher(() =>
642 new MatchesJsonObject("search.getTypeHierarchy result", null,
643 optionalFields: {"hierarchyItems": isListOf(isTypeHierarchyItem)}));
644
645 /**
646 * search.results params
647 *
648 * {
649 * "id": SearchId
650 * "results": List<SearchResult>
651 * "isLast": bool
652 * }
653 */
654 final Matcher isSearchResultsParams = new LazyMatcher(() =>
655 new MatchesJsonObject("search.results params", {
656 "id": isSearchId,
657 "results": isListOf(isSearchResult),
658 "isLast": isBool
659 }));
660
661 /**
662 * edit.format params
663 *
664 * {
665 * "file": FilePath
666 * "selectionOffset": int
667 * "selectionLength": int
668 * "lineLength": optional int
669 * }
670 */
671 final Matcher isEditFormatParams = new LazyMatcher(() => new MatchesJsonObject(
672 "edit.format params",
673 {"file": isFilePath, "selectionOffset": isInt, "selectionLength": isInt},
674 optionalFields: {"lineLength": isInt}));
675
676 /**
677 * edit.format result
678 *
679 * {
680 * "edits": List<SourceEdit>
681 * "selectionOffset": int
682 * "selectionLength": int
683 * }
684 */
685 final Matcher isEditFormatResult =
686 new LazyMatcher(() => new MatchesJsonObject("edit.format result", {
687 "edits": isListOf(isSourceEdit),
688 "selectionOffset": isInt,
689 "selectionLength": isInt
690 }));
691
692 /**
693 * edit.getAssists params
694 *
695 * {
696 * "file": FilePath
697 * "offset": int
698 * "length": int
699 * }
700 */
701 final Matcher isEditGetAssistsParams = new LazyMatcher(() =>
702 new MatchesJsonObject("edit.getAssists params",
703 {"file": isFilePath, "offset": isInt, "length": isInt}));
704
705 /**
706 * edit.getAssists result
707 *
708 * {
709 * "assists": List<SourceChange>
710 * }
711 */
712 final Matcher isEditGetAssistsResult = new LazyMatcher(() =>
713 new MatchesJsonObject(
714 "edit.getAssists result", {"assists": isListOf(isSourceChange)}));
715
716 /**
717 * edit.getAvailableRefactorings params
718 *
719 * {
720 * "file": FilePath
721 * "offset": int
722 * "length": int
723 * }
724 */
725 final Matcher isEditGetAvailableRefactoringsParams = new LazyMatcher(() =>
726 new MatchesJsonObject("edit.getAvailableRefactorings params",
727 {"file": isFilePath, "offset": isInt, "length": isInt}));
728
729 /**
730 * edit.getAvailableRefactorings result
731 *
732 * {
733 * "kinds": List<RefactoringKind>
734 * }
735 */
736 final Matcher isEditGetAvailableRefactoringsResult = new LazyMatcher(() =>
737 new MatchesJsonObject("edit.getAvailableRefactorings result",
738 {"kinds": isListOf(isRefactoringKind)}));
739
740 /**
741 * edit.getFixes params
742 *
743 * {
744 * "file": FilePath
745 * "offset": int
746 * }
747 */
748 final Matcher isEditGetFixesParams = new LazyMatcher(() =>
749 new MatchesJsonObject(
750 "edit.getFixes params", {"file": isFilePath, "offset": isInt}));
751
752 /**
753 * edit.getFixes result
754 *
755 * {
756 * "fixes": List<AnalysisErrorFixes>
757 * }
758 */
759 final Matcher isEditGetFixesResult = new LazyMatcher(() =>
760 new MatchesJsonObject(
761 "edit.getFixes result", {"fixes": isListOf(isAnalysisErrorFixes)}));
762
763 /**
764 * edit.getRefactoring params
765 *
766 * {
767 * "kind": RefactoringKind
768 * "file": FilePath
769 * "offset": int
770 * "length": int
771 * "validateOnly": bool
772 * "options": optional RefactoringOptions
773 * }
774 */
775 final Matcher isEditGetRefactoringParams =
776 new LazyMatcher(() => new MatchesJsonObject("edit.getRefactoring params", {
777 "kind": isRefactoringKind,
778 "file": isFilePath,
779 "offset": isInt,
780 "length": isInt,
781 "validateOnly": isBool
782 }, optionalFields: {
783 "options": isRefactoringOptions
784 }));
785
786 /**
787 * edit.getRefactoring result
788 *
789 * {
790 * "initialProblems": List<RefactoringProblem>
791 * "optionsProblems": List<RefactoringProblem>
792 * "finalProblems": List<RefactoringProblem>
793 * "feedback": optional RefactoringFeedback
794 * "change": optional SourceChange
795 * "potentialEdits": optional List<String>
796 * }
797 */
798 final Matcher isEditGetRefactoringResult =
799 new LazyMatcher(() => new MatchesJsonObject("edit.getRefactoring result", {
800 "initialProblems": isListOf(isRefactoringProblem),
801 "optionsProblems": isListOf(isRefactoringProblem),
802 "finalProblems": isListOf(isRefactoringProblem)
803 }, optionalFields: {
804 "feedback": isRefactoringFeedback,
805 "change": isSourceChange,
806 "potentialEdits": isListOf(isString)
807 }));
808
809 /**
810 * edit.getStatementCompletion params
811 *
812 * {
813 * "file": FilePath
814 * "offset": int
815 * }
816 */
817 final Matcher isEditGetStatementCompletionParams = new LazyMatcher(() =>
818 new MatchesJsonObject("edit.getStatementCompletion params",
819 {"file": isFilePath, "offset": isInt}));
820
821 /**
822 * edit.getStatementCompletion result
823 *
824 * {
825 * "change": SourceChange
826 * "whitespaceOnly": bool
827 * }
828 */
829 final Matcher isEditGetStatementCompletionResult = new LazyMatcher(() =>
830 new MatchesJsonObject("edit.getStatementCompletion result",
831 {"change": isSourceChange, "whitespaceOnly": isBool}));
832
833 /**
834 * edit.sortMembers params
835 *
836 * {
837 * "file": FilePath
838 * }
839 */
840 final Matcher isEditSortMembersParams = new LazyMatcher(() =>
841 new MatchesJsonObject("edit.sortMembers params", {"file": isFilePath}));
842
843 /**
844 * edit.sortMembers result
845 *
846 * {
847 * "edit": SourceFileEdit
848 * }
849 */
850 final Matcher isEditSortMembersResult = new LazyMatcher(() =>
851 new MatchesJsonObject(
852 "edit.sortMembers result", {"edit": isSourceFileEdit}));
853
854 /**
855 * edit.organizeDirectives params
856 *
857 * {
858 * "file": FilePath
859 * }
860 */
861 final Matcher isEditOrganizeDirectivesParams = new LazyMatcher(() =>
862 new MatchesJsonObject(
863 "edit.organizeDirectives params", {"file": isFilePath}));
864
865 /**
866 * edit.organizeDirectives result
867 *
868 * {
869 * "edit": SourceFileEdit
870 * }
871 */
872 final Matcher isEditOrganizeDirectivesResult = new LazyMatcher(() =>
873 new MatchesJsonObject(
874 "edit.organizeDirectives result", {"edit": isSourceFileEdit}));
875
876 /**
877 * execution.createContext params
878 *
879 * {
880 * "contextRoot": FilePath
881 * }
882 */
883 final Matcher isExecutionCreateContextParams = new LazyMatcher(() =>
884 new MatchesJsonObject(
885 "execution.createContext params", {"contextRoot": isFilePath}));
886
887 /**
888 * execution.createContext result
889 *
890 * {
891 * "id": ExecutionContextId
892 * }
893 */
894 final Matcher isExecutionCreateContextResult = new LazyMatcher(() =>
895 new MatchesJsonObject(
896 "execution.createContext result", {"id": isExecutionContextId}));
897
898 /**
899 * execution.deleteContext params
900 *
901 * {
902 * "id": ExecutionContextId
903 * }
904 */
905 final Matcher isExecutionDeleteContextParams = new LazyMatcher(() =>
906 new MatchesJsonObject(
907 "execution.deleteContext params", {"id": isExecutionContextId}));
908
909 /**
910 * execution.deleteContext result
911 */
912 final Matcher isExecutionDeleteContextResult = isNull;
913
914 /**
915 * execution.mapUri params
916 *
917 * {
918 * "id": ExecutionContextId
919 * "file": optional FilePath
920 * "uri": optional String
921 * }
922 */
923 final Matcher isExecutionMapUriParams = new LazyMatcher(() =>
924 new MatchesJsonObject(
925 "execution.mapUri params", {"id": isExecutionContextId},
926 optionalFields: {"file": isFilePath, "uri": isString}));
927
928 /**
929 * execution.mapUri result
930 *
931 * {
932 * "file": optional FilePath
933 * "uri": optional String
934 * }
935 */
936 final Matcher isExecutionMapUriResult = new LazyMatcher(() =>
937 new MatchesJsonObject("execution.mapUri result", null,
938 optionalFields: {"file": isFilePath, "uri": isString}));
939
940 /**
941 * execution.setSubscriptions params
942 *
943 * {
944 * "subscriptions": List<ExecutionService>
945 * }
946 */
947 final Matcher isExecutionSetSubscriptionsParams = new LazyMatcher(() =>
948 new MatchesJsonObject("execution.setSubscriptions params",
949 {"subscriptions": isListOf(isExecutionService)}));
950
951 /**
952 * execution.setSubscriptions result
953 */
954 final Matcher isExecutionSetSubscriptionsResult = isNull;
955
956 /**
957 * execution.launchData params
958 *
959 * {
960 * "file": FilePath
961 * "kind": optional ExecutableKind
962 * "referencedFiles": optional List<FilePath>
963 * }
964 */
965 final Matcher isExecutionLaunchDataParams = new LazyMatcher(() =>
966 new MatchesJsonObject("execution.launchData params", {
967 "file": isFilePath
968 }, optionalFields: {
969 "kind": isExecutableKind,
970 "referencedFiles": isListOf(isFilePath)
971 }));
972
973 /**
974 * diagnostic.getDiagnostics params
975 */
976 final Matcher isDiagnosticGetDiagnosticsParams = isNull;
977
978 /**
979 * diagnostic.getDiagnostics result
980 *
981 * {
982 * "contexts": List<ContextData>
983 * }
984 */
985 final Matcher isDiagnosticGetDiagnosticsResult = new LazyMatcher(() =>
986 new MatchesJsonObject("diagnostic.getDiagnostics result",
987 {"contexts": isListOf(isContextData)}));
988
989 /**
990 * diagnostic.getServerPort params
991 */
992 final Matcher isDiagnosticGetServerPortParams = isNull;
993
994 /**
995 * diagnostic.getServerPort result
996 *
997 * {
998 * "port": int
999 * }
1000 */
1001 final Matcher isDiagnosticGetServerPortResult = new LazyMatcher(() =>
1002 new MatchesJsonObject("diagnostic.getServerPort result", {"port": isInt}));
1003
1004 /**
1005 * AddContentOverlay 17 * AddContentOverlay
1006 * 18 *
1007 * { 19 * {
1008 * "type": "add" 20 * "type": "add"
1009 * "content": String 21 * "content": String
1010 * } 22 * }
1011 */ 23 */
1012 final Matcher isAddContentOverlay = new LazyMatcher(() => new MatchesJsonObject( 24 final Matcher isAddContentOverlay = new LazyMatcher(() => new MatchesJsonObject(
1013 "AddContentOverlay", {"type": equals("add"), "content": isString})); 25 "AddContentOverlay", {"type": equals("add"), "content": isString}));
1014 26
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 * "offset": int 801 * "offset": int
1790 * "length": int 802 * "length": int
1791 * "children": optional List<Outline> 803 * "children": optional List<Outline>
1792 * } 804 * }
1793 */ 805 */
1794 final Matcher isOutline = new LazyMatcher(() => new MatchesJsonObject( 806 final Matcher isOutline = new LazyMatcher(() => new MatchesJsonObject(
1795 "Outline", {"element": isElement, "offset": isInt, "length": isInt}, 807 "Outline", {"element": isElement, "offset": isInt, "length": isInt},
1796 optionalFields: {"children": isListOf(isOutline)})); 808 optionalFields: {"children": isListOf(isOutline)}));
1797 809
1798 /** 810 /**
811 * OverriddenMember
812 *
813 * {
814 * "element": Element
815 * "className": String
816 * }
817 */
818 final Matcher isOverriddenMember = new LazyMatcher(() => new MatchesJsonObject(
819 "OverriddenMember", {"element": isElement, "className": isString}));
820
821 /**
1799 * Override 822 * Override
1800 * 823 *
1801 * { 824 * {
1802 * "offset": int 825 * "offset": int
1803 * "length": int 826 * "length": int
1804 * "superclassMember": optional OverriddenMember 827 * "superclassMember": optional OverriddenMember
1805 * "interfaceMembers": optional List<OverriddenMember> 828 * "interfaceMembers": optional List<OverriddenMember>
1806 * } 829 * }
1807 */ 830 */
1808 final Matcher isOverride = 831 final Matcher isOverride =
1809 new LazyMatcher(() => new MatchesJsonObject("Override", { 832 new LazyMatcher(() => new MatchesJsonObject("Override", {
1810 "offset": isInt, 833 "offset": isInt,
1811 "length": isInt 834 "length": isInt
1812 }, optionalFields: { 835 }, optionalFields: {
1813 "superclassMember": isOverriddenMember, 836 "superclassMember": isOverriddenMember,
1814 "interfaceMembers": isListOf(isOverriddenMember) 837 "interfaceMembers": isListOf(isOverriddenMember)
1815 })); 838 }));
1816 839
1817 /** 840 /**
1818 * OverriddenMember
1819 *
1820 * {
1821 * "element": Element
1822 * "className": String
1823 * }
1824 */
1825 final Matcher isOverriddenMember = new LazyMatcher(() => new MatchesJsonObject(
1826 "OverriddenMember", {"element": isElement, "className": isString}));
1827
1828 /**
1829 * Position 841 * Position
1830 * 842 *
1831 * { 843 * {
1832 * "file": FilePath 844 * "file": FilePath
1833 * "offset": int 845 * "offset": int
1834 * } 846 * }
1835 */ 847 */
1836 final Matcher isPosition = new LazyMatcher(() => 848 final Matcher isPosition = new LazyMatcher(() =>
1837 new MatchesJsonObject("Position", {"file": isFilePath, "offset": isInt})); 849 new MatchesJsonObject("Position", {"file": isFilePath, "offset": isInt}));
1838 850
1839 /** 851 /**
1840 * PubStatus 852 * PubStatus
1841 * 853 *
1842 * { 854 * {
1843 * "isListingPackageDirs": bool 855 * "isListingPackageDirs": bool
1844 * } 856 * }
1845 */ 857 */
1846 final Matcher isPubStatus = new LazyMatcher( 858 final Matcher isPubStatus = new LazyMatcher(
1847 () => new MatchesJsonObject("PubStatus", {"isListingPackageDirs": isBool})); 859 () => new MatchesJsonObject("PubStatus", {"isListingPackageDirs": isBool}));
1848 860
1849 /** 861 /**
862 * RefactoringFeedback
863 *
864 * {
865 * }
866 */
867 final Matcher isRefactoringFeedback =
868 new LazyMatcher(() => new MatchesJsonObject("RefactoringFeedback", null));
869
870 /**
1850 * RefactoringKind 871 * RefactoringKind
1851 * 872 *
1852 * enum { 873 * enum {
1853 * CONVERT_GETTER_TO_METHOD 874 * CONVERT_GETTER_TO_METHOD
1854 * CONVERT_METHOD_TO_GETTER 875 * CONVERT_METHOD_TO_GETTER
1855 * EXTRACT_LOCAL_VARIABLE 876 * EXTRACT_LOCAL_VARIABLE
1856 * EXTRACT_METHOD 877 * EXTRACT_METHOD
1857 * INLINE_LOCAL_VARIABLE 878 * INLINE_LOCAL_VARIABLE
1858 * INLINE_METHOD 879 * INLINE_METHOD
1859 * MOVE_FILE 880 * MOVE_FILE
(...skipping 28 matching lines...) Expand all
1888 new MatchesJsonObject("RefactoringMethodParameter", { 909 new MatchesJsonObject("RefactoringMethodParameter", {
1889 "kind": isRefactoringMethodParameterKind, 910 "kind": isRefactoringMethodParameterKind,
1890 "type": isString, 911 "type": isString,
1891 "name": isString 912 "name": isString
1892 }, optionalFields: { 913 }, optionalFields: {
1893 "id": isString, 914 "id": isString,
1894 "parameters": isString 915 "parameters": isString
1895 })); 916 }));
1896 917
1897 /** 918 /**
1898 * RefactoringFeedback
1899 *
1900 * {
1901 * }
1902 */
1903 final Matcher isRefactoringFeedback =
1904 new LazyMatcher(() => new MatchesJsonObject("RefactoringFeedback", null));
1905
1906 /**
1907 * RefactoringOptions
1908 *
1909 * {
1910 * }
1911 */
1912 final Matcher isRefactoringOptions =
1913 new LazyMatcher(() => new MatchesJsonObject("RefactoringOptions", null));
1914
1915 /**
1916 * RefactoringMethodParameterKind 919 * RefactoringMethodParameterKind
1917 * 920 *
1918 * enum { 921 * enum {
1919 * REQUIRED 922 * REQUIRED
1920 * POSITIONAL 923 * POSITIONAL
1921 * NAMED 924 * NAMED
1922 * } 925 * }
1923 */ 926 */
1924 final Matcher isRefactoringMethodParameterKind = new MatchesEnum( 927 final Matcher isRefactoringMethodParameterKind = new MatchesEnum(
1925 "RefactoringMethodParameterKind", ["REQUIRED", "POSITIONAL", "NAMED"]); 928 "RefactoringMethodParameterKind", ["REQUIRED", "POSITIONAL", "NAMED"]);
1926 929
1927 /** 930 /**
931 * RefactoringOptions
932 *
933 * {
934 * }
935 */
936 final Matcher isRefactoringOptions =
937 new LazyMatcher(() => new MatchesJsonObject("RefactoringOptions", null));
938
939 /**
1928 * RefactoringProblem 940 * RefactoringProblem
1929 * 941 *
1930 * { 942 * {
1931 * "severity": RefactoringProblemSeverity 943 * "severity": RefactoringProblemSeverity
1932 * "message": String 944 * "message": String
1933 * "location": optional Location 945 * "location": optional Location
1934 * } 946 * }
1935 */ 947 */
1936 final Matcher isRefactoringProblem = new LazyMatcher(() => 948 final Matcher isRefactoringProblem = new LazyMatcher(() =>
1937 new MatchesJsonObject("RefactoringProblem", 949 new MatchesJsonObject("RefactoringProblem",
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 "interfaces": isListOf(isInt), 1165 "interfaces": isListOf(isInt),
2154 "mixins": isListOf(isInt), 1166 "mixins": isListOf(isInt),
2155 "subclasses": isListOf(isInt) 1167 "subclasses": isListOf(isInt)
2156 }, optionalFields: { 1168 }, optionalFields: {
2157 "displayName": isString, 1169 "displayName": isString,
2158 "memberElement": isElement, 1170 "memberElement": isElement,
2159 "superclass": isInt 1171 "superclass": isInt
2160 })); 1172 }));
2161 1173
2162 /** 1174 /**
1175 * analysis.analyzedFiles params
1176 *
1177 * {
1178 * "directories": List<FilePath>
1179 * }
1180 */
1181 final Matcher isAnalysisAnalyzedFilesParams = new LazyMatcher(() =>
1182 new MatchesJsonObject("analysis.analyzedFiles params",
1183 {"directories": isListOf(isFilePath)}));
1184
1185 /**
1186 * analysis.errors params
1187 *
1188 * {
1189 * "file": FilePath
1190 * "errors": List<AnalysisError>
1191 * }
1192 */
1193 final Matcher isAnalysisErrorsParams = new LazyMatcher(() =>
1194 new MatchesJsonObject("analysis.errors params",
1195 {"file": isFilePath, "errors": isListOf(isAnalysisError)}));
1196
1197 /**
1198 * analysis.flushResults params
1199 *
1200 * {
1201 * "files": List<FilePath>
1202 * }
1203 */
1204 final Matcher isAnalysisFlushResultsParams = new LazyMatcher(() =>
1205 new MatchesJsonObject(
1206 "analysis.flushResults params", {"files": isListOf(isFilePath)}));
1207
1208 /**
1209 * analysis.folding params
1210 *
1211 * {
1212 * "file": FilePath
1213 * "regions": List<FoldingRegion>
1214 * }
1215 */
1216 final Matcher isAnalysisFoldingParams = new LazyMatcher(() =>
1217 new MatchesJsonObject("analysis.folding params",
1218 {"file": isFilePath, "regions": isListOf(isFoldingRegion)}));
1219
1220 /**
1221 * analysis.getErrors params
1222 *
1223 * {
1224 * "file": FilePath
1225 * }
1226 */
1227 final Matcher isAnalysisGetErrorsParams = new LazyMatcher(() =>
1228 new MatchesJsonObject("analysis.getErrors params", {"file": isFilePath}));
1229
1230 /**
1231 * analysis.getErrors result
1232 *
1233 * {
1234 * "errors": List<AnalysisError>
1235 * }
1236 */
1237 final Matcher isAnalysisGetErrorsResult = new LazyMatcher(() =>
1238 new MatchesJsonObject(
1239 "analysis.getErrors result", {"errors": isListOf(isAnalysisError)}));
1240
1241 /**
1242 * analysis.getHover params
1243 *
1244 * {
1245 * "file": FilePath
1246 * "offset": int
1247 * }
1248 */
1249 final Matcher isAnalysisGetHoverParams = new LazyMatcher(() =>
1250 new MatchesJsonObject(
1251 "analysis.getHover params", {"file": isFilePath, "offset": isInt}));
1252
1253 /**
1254 * analysis.getHover result
1255 *
1256 * {
1257 * "hovers": List<HoverInformation>
1258 * }
1259 */
1260 final Matcher isAnalysisGetHoverResult = new LazyMatcher(() =>
1261 new MatchesJsonObject(
1262 "analysis.getHover result", {"hovers": isListOf(isHoverInformation)}));
1263
1264 /**
1265 * analysis.getLibraryDependencies params
1266 */
1267 final Matcher isAnalysisGetLibraryDependenciesParams = isNull;
1268
1269 /**
1270 * analysis.getLibraryDependencies result
1271 *
1272 * {
1273 * "libraries": List<FilePath>
1274 * "packageMap": Map<String, Map<String, List<FilePath>>>
1275 * }
1276 */
1277 final Matcher isAnalysisGetLibraryDependenciesResult = new LazyMatcher(
1278 () => new MatchesJsonObject("analysis.getLibraryDependencies result", {
1279 "libraries": isListOf(isFilePath),
1280 "packageMap":
1281 isMapOf(isString, isMapOf(isString, isListOf(isFilePath)))
1282 }));
1283
1284 /**
1285 * analysis.getNavigation params
1286 *
1287 * {
1288 * "file": FilePath
1289 * "offset": int
1290 * "length": int
1291 * }
1292 */
1293 final Matcher isAnalysisGetNavigationParams = new LazyMatcher(() =>
1294 new MatchesJsonObject("analysis.getNavigation params",
1295 {"file": isFilePath, "offset": isInt, "length": isInt}));
1296
1297 /**
1298 * analysis.getNavigation result
1299 *
1300 * {
1301 * "files": List<FilePath>
1302 * "targets": List<NavigationTarget>
1303 * "regions": List<NavigationRegion>
1304 * }
1305 */
1306 final Matcher isAnalysisGetNavigationResult = new LazyMatcher(
1307 () => new MatchesJsonObject("analysis.getNavigation result", {
1308 "files": isListOf(isFilePath),
1309 "targets": isListOf(isNavigationTarget),
1310 "regions": isListOf(isNavigationRegion)
1311 }));
1312
1313 /**
1314 * analysis.getReachableSources params
1315 *
1316 * {
1317 * "file": FilePath
1318 * }
1319 */
1320 final Matcher isAnalysisGetReachableSourcesParams = new LazyMatcher(() =>
1321 new MatchesJsonObject(
1322 "analysis.getReachableSources params", {"file": isFilePath}));
1323
1324 /**
1325 * analysis.getReachableSources result
1326 *
1327 * {
1328 * "sources": Map<String, List<String>>
1329 * }
1330 */
1331 final Matcher isAnalysisGetReachableSourcesResult = new LazyMatcher(() =>
1332 new MatchesJsonObject("analysis.getReachableSources result",
1333 {"sources": isMapOf(isString, isListOf(isString))}));
1334
1335 /**
1336 * analysis.highlights params
1337 *
1338 * {
1339 * "file": FilePath
1340 * "regions": List<HighlightRegion>
1341 * }
1342 */
1343 final Matcher isAnalysisHighlightsParams = new LazyMatcher(() =>
1344 new MatchesJsonObject("analysis.highlights params",
1345 {"file": isFilePath, "regions": isListOf(isHighlightRegion)}));
1346
1347 /**
1348 * analysis.implemented params
1349 *
1350 * {
1351 * "file": FilePath
1352 * "classes": List<ImplementedClass>
1353 * "members": List<ImplementedMember>
1354 * }
1355 */
1356 final Matcher isAnalysisImplementedParams =
1357 new LazyMatcher(() => new MatchesJsonObject("analysis.implemented params", {
1358 "file": isFilePath,
1359 "classes": isListOf(isImplementedClass),
1360 "members": isListOf(isImplementedMember)
1361 }));
1362
1363 /**
1364 * analysis.invalidate params
1365 *
1366 * {
1367 * "file": FilePath
1368 * "offset": int
1369 * "length": int
1370 * "delta": int
1371 * }
1372 */
1373 final Matcher isAnalysisInvalidateParams = new LazyMatcher(() =>
1374 new MatchesJsonObject("analysis.invalidate params", {
1375 "file": isFilePath,
1376 "offset": isInt,
1377 "length": isInt,
1378 "delta": isInt
1379 }));
1380
1381 /**
1382 * analysis.navigation params
1383 *
1384 * {
1385 * "file": FilePath
1386 * "regions": List<NavigationRegion>
1387 * "targets": List<NavigationTarget>
1388 * "files": List<FilePath>
1389 * }
1390 */
1391 final Matcher isAnalysisNavigationParams =
1392 new LazyMatcher(() => new MatchesJsonObject("analysis.navigation params", {
1393 "file": isFilePath,
1394 "regions": isListOf(isNavigationRegion),
1395 "targets": isListOf(isNavigationTarget),
1396 "files": isListOf(isFilePath)
1397 }));
1398
1399 /**
1400 * analysis.occurrences params
1401 *
1402 * {
1403 * "file": FilePath
1404 * "occurrences": List<Occurrences>
1405 * }
1406 */
1407 final Matcher isAnalysisOccurrencesParams = new LazyMatcher(() =>
1408 new MatchesJsonObject("analysis.occurrences params",
1409 {"file": isFilePath, "occurrences": isListOf(isOccurrences)}));
1410
1411 /**
1412 * analysis.outline params
1413 *
1414 * {
1415 * "file": FilePath
1416 * "kind": FileKind
1417 * "libraryName": optional String
1418 * "outline": Outline
1419 * }
1420 */
1421 final Matcher isAnalysisOutlineParams = new LazyMatcher(() =>
1422 new MatchesJsonObject("analysis.outline params",
1423 {"file": isFilePath, "kind": isFileKind, "outline": isOutline},
1424 optionalFields: {"libraryName": isString}));
1425
1426 /**
1427 * analysis.overrides params
1428 *
1429 * {
1430 * "file": FilePath
1431 * "overrides": List<Override>
1432 * }
1433 */
1434 final Matcher isAnalysisOverridesParams = new LazyMatcher(() =>
1435 new MatchesJsonObject("analysis.overrides params",
1436 {"file": isFilePath, "overrides": isListOf(isOverride)}));
1437
1438 /**
1439 * analysis.reanalyze params
1440 *
1441 * {
1442 * "roots": optional List<FilePath>
1443 * }
1444 */
1445 final Matcher isAnalysisReanalyzeParams = new LazyMatcher(() =>
1446 new MatchesJsonObject("analysis.reanalyze params", null,
1447 optionalFields: {"roots": isListOf(isFilePath)}));
1448
1449 /**
1450 * analysis.reanalyze result
1451 */
1452 final Matcher isAnalysisReanalyzeResult = isNull;
1453
1454 /**
1455 * analysis.setAnalysisRoots params
1456 *
1457 * {
1458 * "included": List<FilePath>
1459 * "excluded": List<FilePath>
1460 * "packageRoots": optional Map<FilePath, FilePath>
1461 * }
1462 */
1463 final Matcher isAnalysisSetAnalysisRootsParams = new LazyMatcher(() =>
1464 new MatchesJsonObject("analysis.setAnalysisRoots params",
1465 {"included": isListOf(isFilePath), "excluded": isListOf(isFilePath)},
1466 optionalFields: {"packageRoots": isMapOf(isFilePath, isFilePath)}));
1467
1468 /**
1469 * analysis.setAnalysisRoots result
1470 */
1471 final Matcher isAnalysisSetAnalysisRootsResult = isNull;
1472
1473 /**
1474 * analysis.setGeneralSubscriptions params
1475 *
1476 * {
1477 * "subscriptions": List<GeneralAnalysisService>
1478 * }
1479 */
1480 final Matcher isAnalysisSetGeneralSubscriptionsParams = new LazyMatcher(() =>
1481 new MatchesJsonObject("analysis.setGeneralSubscriptions params",
1482 {"subscriptions": isListOf(isGeneralAnalysisService)}));
1483
1484 /**
1485 * analysis.setGeneralSubscriptions result
1486 */
1487 final Matcher isAnalysisSetGeneralSubscriptionsResult = isNull;
1488
1489 /**
1490 * analysis.setPriorityFiles params
1491 *
1492 * {
1493 * "files": List<FilePath>
1494 * }
1495 */
1496 final Matcher isAnalysisSetPriorityFilesParams = new LazyMatcher(() =>
1497 new MatchesJsonObject(
1498 "analysis.setPriorityFiles params", {"files": isListOf(isFilePath)}));
1499
1500 /**
1501 * analysis.setPriorityFiles result
1502 */
1503 final Matcher isAnalysisSetPriorityFilesResult = isNull;
1504
1505 /**
1506 * analysis.setSubscriptions params
1507 *
1508 * {
1509 * "subscriptions": Map<AnalysisService, List<FilePath>>
1510 * }
1511 */
1512 final Matcher isAnalysisSetSubscriptionsParams = new LazyMatcher(() =>
1513 new MatchesJsonObject("analysis.setSubscriptions params",
1514 {"subscriptions": isMapOf(isAnalysisService, isListOf(isFilePath))}));
1515
1516 /**
1517 * analysis.setSubscriptions result
1518 */
1519 final Matcher isAnalysisSetSubscriptionsResult = isNull;
1520
1521 /**
1522 * analysis.updateContent params
1523 *
1524 * {
1525 * "files": Map<FilePath, AddContentOverlay | ChangeContentOverlay | RemoveCon tentOverlay>
1526 * }
1527 */
1528 final Matcher isAnalysisUpdateContentParams = new LazyMatcher(
1529 () => new MatchesJsonObject("analysis.updateContent params", {
1530 "files": isMapOf(
1531 isFilePath,
1532 isOneOf([
1533 isAddContentOverlay,
1534 isChangeContentOverlay,
1535 isRemoveContentOverlay
1536 ]))
1537 }));
1538
1539 /**
1540 * analysis.updateContent result
1541 *
1542 * {
1543 * }
1544 */
1545 final Matcher isAnalysisUpdateContentResult = new LazyMatcher(
1546 () => new MatchesJsonObject("analysis.updateContent result", null));
1547
1548 /**
1549 * analysis.updateOptions params
1550 *
1551 * {
1552 * "options": AnalysisOptions
1553 * }
1554 */
1555 final Matcher isAnalysisUpdateOptionsParams = new LazyMatcher(() =>
1556 new MatchesJsonObject(
1557 "analysis.updateOptions params", {"options": isAnalysisOptions}));
1558
1559 /**
1560 * analysis.updateOptions result
1561 */
1562 final Matcher isAnalysisUpdateOptionsResult = isNull;
1563
1564 /**
1565 * completion.getSuggestions params
1566 *
1567 * {
1568 * "file": FilePath
1569 * "offset": int
1570 * }
1571 */
1572 final Matcher isCompletionGetSuggestionsParams = new LazyMatcher(() =>
1573 new MatchesJsonObject("completion.getSuggestions params",
1574 {"file": isFilePath, "offset": isInt}));
1575
1576 /**
1577 * completion.getSuggestions result
1578 *
1579 * {
1580 * "id": CompletionId
1581 * }
1582 */
1583 final Matcher isCompletionGetSuggestionsResult = new LazyMatcher(() =>
1584 new MatchesJsonObject(
1585 "completion.getSuggestions result", {"id": isCompletionId}));
1586
1587 /**
1588 * completion.results params
1589 *
1590 * {
1591 * "id": CompletionId
1592 * "replacementOffset": int
1593 * "replacementLength": int
1594 * "results": List<CompletionSuggestion>
1595 * "isLast": bool
1596 * }
1597 */
1598 final Matcher isCompletionResultsParams =
1599 new LazyMatcher(() => new MatchesJsonObject("completion.results params", {
1600 "id": isCompletionId,
1601 "replacementOffset": isInt,
1602 "replacementLength": isInt,
1603 "results": isListOf(isCompletionSuggestion),
1604 "isLast": isBool
1605 }));
1606
1607 /**
2163 * convertGetterToMethod feedback 1608 * convertGetterToMethod feedback
2164 */ 1609 */
2165 final Matcher isConvertGetterToMethodFeedback = isNull; 1610 final Matcher isConvertGetterToMethodFeedback = isNull;
2166 1611
2167 /** 1612 /**
2168 * convertGetterToMethod options 1613 * convertGetterToMethod options
2169 */ 1614 */
2170 final Matcher isConvertGetterToMethodOptions = isNull; 1615 final Matcher isConvertGetterToMethodOptions = isNull;
2171 1616
2172 /** 1617 /**
2173 * convertMethodToGetter feedback 1618 * convertMethodToGetter feedback
2174 */ 1619 */
2175 final Matcher isConvertMethodToGetterFeedback = isNull; 1620 final Matcher isConvertMethodToGetterFeedback = isNull;
2176 1621
2177 /** 1622 /**
2178 * convertMethodToGetter options 1623 * convertMethodToGetter options
2179 */ 1624 */
2180 final Matcher isConvertMethodToGetterOptions = isNull; 1625 final Matcher isConvertMethodToGetterOptions = isNull;
2181 1626
2182 /** 1627 /**
1628 * diagnostic.getDiagnostics params
1629 */
1630 final Matcher isDiagnosticGetDiagnosticsParams = isNull;
1631
1632 /**
1633 * diagnostic.getDiagnostics result
1634 *
1635 * {
1636 * "contexts": List<ContextData>
1637 * }
1638 */
1639 final Matcher isDiagnosticGetDiagnosticsResult = new LazyMatcher(() =>
1640 new MatchesJsonObject("diagnostic.getDiagnostics result",
1641 {"contexts": isListOf(isContextData)}));
1642
1643 /**
1644 * diagnostic.getServerPort params
1645 */
1646 final Matcher isDiagnosticGetServerPortParams = isNull;
1647
1648 /**
1649 * diagnostic.getServerPort result
1650 *
1651 * {
1652 * "port": int
1653 * }
1654 */
1655 final Matcher isDiagnosticGetServerPortResult = new LazyMatcher(() =>
1656 new MatchesJsonObject("diagnostic.getServerPort result", {"port": isInt}));
1657
1658 /**
1659 * edit.format params
1660 *
1661 * {
1662 * "file": FilePath
1663 * "selectionOffset": int
1664 * "selectionLength": int
1665 * "lineLength": optional int
1666 * }
1667 */
1668 final Matcher isEditFormatParams = new LazyMatcher(() => new MatchesJsonObject(
1669 "edit.format params",
1670 {"file": isFilePath, "selectionOffset": isInt, "selectionLength": isInt},
1671 optionalFields: {"lineLength": isInt}));
1672
1673 /**
1674 * edit.format result
1675 *
1676 * {
1677 * "edits": List<SourceEdit>
1678 * "selectionOffset": int
1679 * "selectionLength": int
1680 * }
1681 */
1682 final Matcher isEditFormatResult =
1683 new LazyMatcher(() => new MatchesJsonObject("edit.format result", {
1684 "edits": isListOf(isSourceEdit),
1685 "selectionOffset": isInt,
1686 "selectionLength": isInt
1687 }));
1688
1689 /**
1690 * edit.getAssists params
1691 *
1692 * {
1693 * "file": FilePath
1694 * "offset": int
1695 * "length": int
1696 * }
1697 */
1698 final Matcher isEditGetAssistsParams = new LazyMatcher(() =>
1699 new MatchesJsonObject("edit.getAssists params",
1700 {"file": isFilePath, "offset": isInt, "length": isInt}));
1701
1702 /**
1703 * edit.getAssists result
1704 *
1705 * {
1706 * "assists": List<SourceChange>
1707 * }
1708 */
1709 final Matcher isEditGetAssistsResult = new LazyMatcher(() =>
1710 new MatchesJsonObject(
1711 "edit.getAssists result", {"assists": isListOf(isSourceChange)}));
1712
1713 /**
1714 * edit.getAvailableRefactorings params
1715 *
1716 * {
1717 * "file": FilePath
1718 * "offset": int
1719 * "length": int
1720 * }
1721 */
1722 final Matcher isEditGetAvailableRefactoringsParams = new LazyMatcher(() =>
1723 new MatchesJsonObject("edit.getAvailableRefactorings params",
1724 {"file": isFilePath, "offset": isInt, "length": isInt}));
1725
1726 /**
1727 * edit.getAvailableRefactorings result
1728 *
1729 * {
1730 * "kinds": List<RefactoringKind>
1731 * }
1732 */
1733 final Matcher isEditGetAvailableRefactoringsResult = new LazyMatcher(() =>
1734 new MatchesJsonObject("edit.getAvailableRefactorings result",
1735 {"kinds": isListOf(isRefactoringKind)}));
1736
1737 /**
1738 * edit.getFixes params
1739 *
1740 * {
1741 * "file": FilePath
1742 * "offset": int
1743 * }
1744 */
1745 final Matcher isEditGetFixesParams = new LazyMatcher(() =>
1746 new MatchesJsonObject(
1747 "edit.getFixes params", {"file": isFilePath, "offset": isInt}));
1748
1749 /**
1750 * edit.getFixes result
1751 *
1752 * {
1753 * "fixes": List<AnalysisErrorFixes>
1754 * }
1755 */
1756 final Matcher isEditGetFixesResult = new LazyMatcher(() =>
1757 new MatchesJsonObject(
1758 "edit.getFixes result", {"fixes": isListOf(isAnalysisErrorFixes)}));
1759
1760 /**
1761 * edit.getRefactoring params
1762 *
1763 * {
1764 * "kind": RefactoringKind
1765 * "file": FilePath
1766 * "offset": int
1767 * "length": int
1768 * "validateOnly": bool
1769 * "options": optional RefactoringOptions
1770 * }
1771 */
1772 final Matcher isEditGetRefactoringParams =
1773 new LazyMatcher(() => new MatchesJsonObject("edit.getRefactoring params", {
1774 "kind": isRefactoringKind,
1775 "file": isFilePath,
1776 "offset": isInt,
1777 "length": isInt,
1778 "validateOnly": isBool
1779 }, optionalFields: {
1780 "options": isRefactoringOptions
1781 }));
1782
1783 /**
1784 * edit.getRefactoring result
1785 *
1786 * {
1787 * "initialProblems": List<RefactoringProblem>
1788 * "optionsProblems": List<RefactoringProblem>
1789 * "finalProblems": List<RefactoringProblem>
1790 * "feedback": optional RefactoringFeedback
1791 * "change": optional SourceChange
1792 * "potentialEdits": optional List<String>
1793 * }
1794 */
1795 final Matcher isEditGetRefactoringResult =
1796 new LazyMatcher(() => new MatchesJsonObject("edit.getRefactoring result", {
1797 "initialProblems": isListOf(isRefactoringProblem),
1798 "optionsProblems": isListOf(isRefactoringProblem),
1799 "finalProblems": isListOf(isRefactoringProblem)
1800 }, optionalFields: {
1801 "feedback": isRefactoringFeedback,
1802 "change": isSourceChange,
1803 "potentialEdits": isListOf(isString)
1804 }));
1805
1806 /**
1807 * edit.getStatementCompletion params
1808 *
1809 * {
1810 * "file": FilePath
1811 * "offset": int
1812 * }
1813 */
1814 final Matcher isEditGetStatementCompletionParams = new LazyMatcher(() =>
1815 new MatchesJsonObject("edit.getStatementCompletion params",
1816 {"file": isFilePath, "offset": isInt}));
1817
1818 /**
1819 * edit.getStatementCompletion result
1820 *
1821 * {
1822 * "change": SourceChange
1823 * "whitespaceOnly": bool
1824 * }
1825 */
1826 final Matcher isEditGetStatementCompletionResult = new LazyMatcher(() =>
1827 new MatchesJsonObject("edit.getStatementCompletion result",
1828 {"change": isSourceChange, "whitespaceOnly": isBool}));
1829
1830 /**
1831 * edit.organizeDirectives params
1832 *
1833 * {
1834 * "file": FilePath
1835 * }
1836 */
1837 final Matcher isEditOrganizeDirectivesParams = new LazyMatcher(() =>
1838 new MatchesJsonObject(
1839 "edit.organizeDirectives params", {"file": isFilePath}));
1840
1841 /**
1842 * edit.organizeDirectives result
1843 *
1844 * {
1845 * "edit": SourceFileEdit
1846 * }
1847 */
1848 final Matcher isEditOrganizeDirectivesResult = new LazyMatcher(() =>
1849 new MatchesJsonObject(
1850 "edit.organizeDirectives result", {"edit": isSourceFileEdit}));
1851
1852 /**
1853 * edit.sortMembers params
1854 *
1855 * {
1856 * "file": FilePath
1857 * }
1858 */
1859 final Matcher isEditSortMembersParams = new LazyMatcher(() =>
1860 new MatchesJsonObject("edit.sortMembers params", {"file": isFilePath}));
1861
1862 /**
1863 * edit.sortMembers result
1864 *
1865 * {
1866 * "edit": SourceFileEdit
1867 * }
1868 */
1869 final Matcher isEditSortMembersResult = new LazyMatcher(() =>
1870 new MatchesJsonObject(
1871 "edit.sortMembers result", {"edit": isSourceFileEdit}));
1872
1873 /**
1874 * execution.createContext params
1875 *
1876 * {
1877 * "contextRoot": FilePath
1878 * }
1879 */
1880 final Matcher isExecutionCreateContextParams = new LazyMatcher(() =>
1881 new MatchesJsonObject(
1882 "execution.createContext params", {"contextRoot": isFilePath}));
1883
1884 /**
1885 * execution.createContext result
1886 *
1887 * {
1888 * "id": ExecutionContextId
1889 * }
1890 */
1891 final Matcher isExecutionCreateContextResult = new LazyMatcher(() =>
1892 new MatchesJsonObject(
1893 "execution.createContext result", {"id": isExecutionContextId}));
1894
1895 /**
1896 * execution.deleteContext params
1897 *
1898 * {
1899 * "id": ExecutionContextId
1900 * }
1901 */
1902 final Matcher isExecutionDeleteContextParams = new LazyMatcher(() =>
1903 new MatchesJsonObject(
1904 "execution.deleteContext params", {"id": isExecutionContextId}));
1905
1906 /**
1907 * execution.deleteContext result
1908 */
1909 final Matcher isExecutionDeleteContextResult = isNull;
1910
1911 /**
1912 * execution.launchData params
1913 *
1914 * {
1915 * "file": FilePath
1916 * "kind": optional ExecutableKind
1917 * "referencedFiles": optional List<FilePath>
1918 * }
1919 */
1920 final Matcher isExecutionLaunchDataParams = new LazyMatcher(() =>
1921 new MatchesJsonObject("execution.launchData params", {
1922 "file": isFilePath
1923 }, optionalFields: {
1924 "kind": isExecutableKind,
1925 "referencedFiles": isListOf(isFilePath)
1926 }));
1927
1928 /**
1929 * execution.mapUri params
1930 *
1931 * {
1932 * "id": ExecutionContextId
1933 * "file": optional FilePath
1934 * "uri": optional String
1935 * }
1936 */
1937 final Matcher isExecutionMapUriParams = new LazyMatcher(() =>
1938 new MatchesJsonObject(
1939 "execution.mapUri params", {"id": isExecutionContextId},
1940 optionalFields: {"file": isFilePath, "uri": isString}));
1941
1942 /**
1943 * execution.mapUri result
1944 *
1945 * {
1946 * "file": optional FilePath
1947 * "uri": optional String
1948 * }
1949 */
1950 final Matcher isExecutionMapUriResult = new LazyMatcher(() =>
1951 new MatchesJsonObject("execution.mapUri result", null,
1952 optionalFields: {"file": isFilePath, "uri": isString}));
1953
1954 /**
1955 * execution.setSubscriptions params
1956 *
1957 * {
1958 * "subscriptions": List<ExecutionService>
1959 * }
1960 */
1961 final Matcher isExecutionSetSubscriptionsParams = new LazyMatcher(() =>
1962 new MatchesJsonObject("execution.setSubscriptions params",
1963 {"subscriptions": isListOf(isExecutionService)}));
1964
1965 /**
1966 * execution.setSubscriptions result
1967 */
1968 final Matcher isExecutionSetSubscriptionsResult = isNull;
1969
1970 /**
2183 * extractLocalVariable feedback 1971 * extractLocalVariable feedback
2184 * 1972 *
2185 * { 1973 * {
2186 * "coveringExpressionOffsets": optional List<int> 1974 * "coveringExpressionOffsets": optional List<int>
2187 * "coveringExpressionLengths": optional List<int> 1975 * "coveringExpressionLengths": optional List<int>
2188 * "names": List<String> 1976 * "names": List<String>
2189 * "offsets": List<int> 1977 * "offsets": List<int>
2190 * "lengths": List<int> 1978 * "lengths": List<int>
2191 * } 1979 * }
2192 */ 1980 */
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
2336 2124
2337 /** 2125 /**
2338 * rename options 2126 * rename options
2339 * 2127 *
2340 * { 2128 * {
2341 * "newName": String 2129 * "newName": String
2342 * } 2130 * }
2343 */ 2131 */
2344 final Matcher isRenameOptions = new LazyMatcher( 2132 final Matcher isRenameOptions = new LazyMatcher(
2345 () => new MatchesJsonObject("rename options", {"newName": isString})); 2133 () => new MatchesJsonObject("rename options", {"newName": isString}));
2134
2135 /**
2136 * search.findElementReferences params
2137 *
2138 * {
2139 * "file": FilePath
2140 * "offset": int
2141 * "includePotential": bool
2142 * }
2143 */
2144 final Matcher isSearchFindElementReferencesParams = new LazyMatcher(() =>
2145 new MatchesJsonObject("search.findElementReferences params",
2146 {"file": isFilePath, "offset": isInt, "includePotential": isBool}));
2147
2148 /**
2149 * search.findElementReferences result
2150 *
2151 * {
2152 * "id": optional SearchId
2153 * "element": optional Element
2154 * }
2155 */
2156 final Matcher isSearchFindElementReferencesResult = new LazyMatcher(() =>
2157 new MatchesJsonObject("search.findElementReferences result", null,
2158 optionalFields: {"id": isSearchId, "element": isElement}));
2159
2160 /**
2161 * search.findMemberDeclarations params
2162 *
2163 * {
2164 * "name": String
2165 * }
2166 */
2167 final Matcher isSearchFindMemberDeclarationsParams = new LazyMatcher(() =>
2168 new MatchesJsonObject(
2169 "search.findMemberDeclarations params", {"name": isString}));
2170
2171 /**
2172 * search.findMemberDeclarations result
2173 *
2174 * {
2175 * "id": SearchId
2176 * }
2177 */
2178 final Matcher isSearchFindMemberDeclarationsResult = new LazyMatcher(() =>
2179 new MatchesJsonObject(
2180 "search.findMemberDeclarations result", {"id": isSearchId}));
2181
2182 /**
2183 * search.findMemberReferences params
2184 *
2185 * {
2186 * "name": String
2187 * }
2188 */
2189 final Matcher isSearchFindMemberReferencesParams = new LazyMatcher(() =>
2190 new MatchesJsonObject(
2191 "search.findMemberReferences params", {"name": isString}));
2192
2193 /**
2194 * search.findMemberReferences result
2195 *
2196 * {
2197 * "id": SearchId
2198 * }
2199 */
2200 final Matcher isSearchFindMemberReferencesResult = new LazyMatcher(() =>
2201 new MatchesJsonObject(
2202 "search.findMemberReferences result", {"id": isSearchId}));
2203
2204 /**
2205 * search.findTopLevelDeclarations params
2206 *
2207 * {
2208 * "pattern": String
2209 * }
2210 */
2211 final Matcher isSearchFindTopLevelDeclarationsParams = new LazyMatcher(() =>
2212 new MatchesJsonObject(
2213 "search.findTopLevelDeclarations params", {"pattern": isString}));
2214
2215 /**
2216 * search.findTopLevelDeclarations result
2217 *
2218 * {
2219 * "id": SearchId
2220 * }
2221 */
2222 final Matcher isSearchFindTopLevelDeclarationsResult = new LazyMatcher(() =>
2223 new MatchesJsonObject(
2224 "search.findTopLevelDeclarations result", {"id": isSearchId}));
2225
2226 /**
2227 * search.getTypeHierarchy params
2228 *
2229 * {
2230 * "file": FilePath
2231 * "offset": int
2232 * "superOnly": optional bool
2233 * }
2234 */
2235 final Matcher isSearchGetTypeHierarchyParams = new LazyMatcher(() =>
2236 new MatchesJsonObject(
2237 "search.getTypeHierarchy params", {"file": isFilePath, "offset": isInt},
2238 optionalFields: {"superOnly": isBool}));
2239
2240 /**
2241 * search.getTypeHierarchy result
2242 *
2243 * {
2244 * "hierarchyItems": optional List<TypeHierarchyItem>
2245 * }
2246 */
2247 final Matcher isSearchGetTypeHierarchyResult = new LazyMatcher(() =>
2248 new MatchesJsonObject("search.getTypeHierarchy result", null,
2249 optionalFields: {"hierarchyItems": isListOf(isTypeHierarchyItem)}));
2250
2251 /**
2252 * search.results params
2253 *
2254 * {
2255 * "id": SearchId
2256 * "results": List<SearchResult>
2257 * "isLast": bool
2258 * }
2259 */
2260 final Matcher isSearchResultsParams = new LazyMatcher(() =>
2261 new MatchesJsonObject("search.results params", {
2262 "id": isSearchId,
2263 "results": isListOf(isSearchResult),
2264 "isLast": isBool
2265 }));
2266
2267 /**
2268 * server.connected params
2269 *
2270 * {
2271 * "version": String
2272 * "pid": int
2273 * "sessionId": optional String
2274 * }
2275 */
2276 final Matcher isServerConnectedParams = new LazyMatcher(() =>
2277 new MatchesJsonObject(
2278 "server.connected params", {"version": isString, "pid": isInt},
2279 optionalFields: {"sessionId": isString}));
2280
2281 /**
2282 * server.error params
2283 *
2284 * {
2285 * "isFatal": bool
2286 * "message": String
2287 * "stackTrace": String
2288 * }
2289 */
2290 final Matcher isServerErrorParams = new LazyMatcher(() => new MatchesJsonObject(
2291 "server.error params",
2292 {"isFatal": isBool, "message": isString, "stackTrace": isString}));
2293
2294 /**
2295 * server.getVersion params
2296 */
2297 final Matcher isServerGetVersionParams = isNull;
2298
2299 /**
2300 * server.getVersion result
2301 *
2302 * {
2303 * "version": String
2304 * }
2305 */
2306 final Matcher isServerGetVersionResult = new LazyMatcher(() =>
2307 new MatchesJsonObject("server.getVersion result", {"version": isString}));
2308
2309 /**
2310 * server.setSubscriptions params
2311 *
2312 * {
2313 * "subscriptions": List<ServerService>
2314 * }
2315 */
2316 final Matcher isServerSetSubscriptionsParams = new LazyMatcher(() =>
2317 new MatchesJsonObject("server.setSubscriptions params",
2318 {"subscriptions": isListOf(isServerService)}));
2319
2320 /**
2321 * server.setSubscriptions result
2322 */
2323 final Matcher isServerSetSubscriptionsResult = isNull;
2324
2325 /**
2326 * server.shutdown params
2327 */
2328 final Matcher isServerShutdownParams = isNull;
2329
2330 /**
2331 * server.shutdown result
2332 */
2333 final Matcher isServerShutdownResult = isNull;
2334
2335 /**
2336 * server.status params
2337 *
2338 * {
2339 * "analysis": optional AnalysisStatus
2340 * "pub": optional PubStatus
2341 * }
2342 */
2343 final Matcher isServerStatusParams = new LazyMatcher(() =>
2344 new MatchesJsonObject("server.status params", null,
2345 optionalFields: {"analysis": isAnalysisStatus, "pub": isPubStatus}));
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/integration/support/integration_tests.dart ('k') | pkg/analysis_server/test/mocks.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698