Chromium Code Reviews| OLD | NEW |
|---|---|
| 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'); |
|
Brian Wilkerson
2014/08/06 18:12:05
Remove the trailing ');
jwren
2014/08/06 18:12:52
'); .. typo? Doesn't look generated
Paul Berry
2014/08/06 18:32:43
Done.
| |
| 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 // | |
| 5 // This file has been automatically generated. Please do not edit it manually. | |
| 6 // To regenerate the file, use the script | |
| 7 // "pkg/analysis_server/spec/generate_files". | |
| 4 | 8 |
| 5 /** | 9 /** |
| 6 * Matchers for data types defined in the analysis server API | 10 * Matchers for data types defined in the analysis server API |
| 7 */ | 11 */ |
| 8 library test.integration.protocol.matchers; | 12 library test.integration.protocol.matchers; |
| 9 | 13 |
| 10 import 'package:unittest/unittest.dart'; | 14 import 'package:unittest/unittest.dart'; |
| 11 | 15 |
| 12 import 'integration_tests.dart'; | 16 import 'integration_tests.dart'; |
| 13 | 17 |
| 18 | |
| 14 /** | 19 /** |
| 15 * server.getVersion params | 20 * server.getVersion params |
| 16 */ | 21 */ |
| 17 final Matcher isServerGetVersionParams = isNull; | 22 final Matcher isServerGetVersionParams = isNull; |
| 18 | 23 |
| 19 /** | 24 /** |
| 20 * server.getVersion result | 25 * server.getVersion result |
| 21 * | 26 * |
| 22 * { | 27 * { |
| 23 * "version": String | 28 * "version": String |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 229 "analysis.updateOptions params", { | 234 "analysis.updateOptions params", { |
| 230 "options": isAnalysisOptions | 235 "options": isAnalysisOptions |
| 231 }); | 236 }); |
| 232 | 237 |
| 233 /** | 238 /** |
| 234 * analysis.updateOptions result | 239 * analysis.updateOptions result |
| 235 */ | 240 */ |
| 236 final Matcher isAnalysisUpdateOptionsResult = isNull; | 241 final Matcher isAnalysisUpdateOptionsResult = isNull; |
| 237 | 242 |
| 238 /** | 243 /** |
| 239 * analysis.updateSdks params | |
| 240 * | |
| 241 * { | |
| 242 * "added": List<FilePath> | |
| 243 * "removed": List<FilePath> | |
| 244 * "default": optional FilePath | |
| 245 * } | |
| 246 */ | |
| 247 final Matcher isAnalysisUpdateSdksParams = new MatchesJsonObject( | |
| 248 "analysis.updateSdks params", { | |
| 249 "added": isListOf(isFilePath), | |
| 250 "removed": isListOf(isFilePath) | |
| 251 }, optionalFields: { | |
| 252 "default": isFilePath | |
| 253 }); | |
| 254 | |
| 255 /** | |
| 256 * analysis.updateSdks result | |
| 257 */ | |
| 258 final Matcher isAnalysisUpdateSdksResult = isNull; | |
| 259 | |
| 260 /** | |
| 261 * analysis.errors params | 244 * analysis.errors params |
| 262 * | 245 * |
| 263 * { | 246 * { |
| 264 * "file": FilePath | 247 * "file": FilePath |
| 265 * "errors": List<AnalysisError> | 248 * "errors": List<AnalysisError> |
| 266 * } | 249 * } |
| 267 */ | 250 */ |
| 268 final Matcher isAnalysisErrorsParams = new MatchesJsonObject( | 251 final Matcher isAnalysisErrorsParams = new MatchesJsonObject( |
| 269 "analysis.errors params", { | 252 "analysis.errors params", { |
| 270 "file": isFilePath, | 253 "file": isFilePath, |
| 271 "errors": isListOf(isAnalysisError) | 254 "errors": isListOf(isAnalysisError) |
| 272 }); | 255 }); |
| 273 | 256 |
| 274 /** | 257 /** |
| 258 * analysis.flushResults params | |
| 259 * | |
| 260 * { | |
| 261 * "files": List<FilePath> | |
| 262 * } | |
| 263 */ | |
| 264 final Matcher isAnalysisFlushResultsParams = new MatchesJsonObject( | |
| 265 "analysis.flushResults params", { | |
| 266 "files": isListOf(isFilePath) | |
| 267 }); | |
| 268 | |
| 269 /** | |
| 275 * analysis.folding params | 270 * analysis.folding params |
| 276 * | 271 * |
| 277 * { | 272 * { |
| 278 * "file": FilePath | 273 * "file": FilePath |
| 279 * "regions": List<FoldingRegion> | 274 * "regions": List<FoldingRegion> |
| 280 * } | 275 * } |
| 281 */ | 276 */ |
| 282 final Matcher isAnalysisFoldingParams = new MatchesJsonObject( | 277 final Matcher isAnalysisFoldingParams = new MatchesJsonObject( |
| 283 "analysis.folding params", { | 278 "analysis.folding params", { |
| 284 "file": isFilePath, | 279 "file": isFilePath, |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 514 final Matcher isSearchGetTypeHierarchyParams = new MatchesJsonObject( | 509 final Matcher isSearchGetTypeHierarchyParams = new MatchesJsonObject( |
| 515 "search.getTypeHierarchy params", { | 510 "search.getTypeHierarchy params", { |
| 516 "file": isFilePath, | 511 "file": isFilePath, |
| 517 "offset": isInt | 512 "offset": isInt |
| 518 }); | 513 }); |
| 519 | 514 |
| 520 /** | 515 /** |
| 521 * search.getTypeHierarchy result | 516 * search.getTypeHierarchy result |
| 522 * | 517 * |
| 523 * { | 518 * { |
| 524 * "hierarchy": TypeHierarchyItem | 519 * "hierarchyItems": List<TypeHierarchyItem> |
| 525 * } | 520 * } |
| 526 */ | 521 */ |
| 527 final Matcher isSearchGetTypeHierarchyResult = new MatchesJsonObject( | 522 final Matcher isSearchGetTypeHierarchyResult = new MatchesJsonObject( |
| 528 "search.getTypeHierarchy result", { | 523 "search.getTypeHierarchy result", { |
| 529 "hierarchy": isTypeHierarchyItem | 524 "hierarchyItems": isListOf(isTypeHierarchyItem) |
| 530 }); | 525 }); |
| 531 | 526 |
| 532 /** | 527 /** |
| 533 * search.results params | 528 * search.results params |
| 534 * | 529 * |
| 535 * { | 530 * { |
| 536 * "id": SearchId | 531 * "id": SearchId |
| 537 * "results": List<SearchResult> | 532 * "results": List<SearchResult> |
| 538 * "last": bool | 533 * "last": bool |
| 539 * } | 534 * } |
| 540 */ | 535 */ |
| 541 final Matcher isSearchResultsParams = new MatchesJsonObject( | 536 final Matcher isSearchResultsParams = new MatchesJsonObject( |
| 542 "search.results params", { | 537 "search.results params", { |
| 543 "id": isSearchId, | 538 "id": isSearchId, |
| 544 "results": isListOf(isSearchResult), | 539 "results": isListOf(isSearchResult), |
| 545 "last": isBool | 540 "last": isBool |
| 546 }); | 541 }); |
| 547 | 542 |
| 548 /** | 543 /** |
| 549 * edit.applyRefactoring params | 544 * edit.getAssists params |
| 550 * | 545 * |
| 551 * { | 546 * { |
| 552 * "id": RefactoringId | |
| 553 * } | |
| 554 */ | |
| 555 final Matcher isEditApplyRefactoringParams = new MatchesJsonObject( | |
| 556 "edit.applyRefactoring params", { | |
| 557 "id": isRefactoringId | |
| 558 }); | |
| 559 | |
| 560 /** | |
| 561 * edit.applyRefactoring result | |
| 562 * | |
| 563 * { | |
| 564 * "status": List<RefactoringProblem> | |
| 565 * "change": SourceChange | |
| 566 * } | |
| 567 */ | |
| 568 final Matcher isEditApplyRefactoringResult = new MatchesJsonObject( | |
| 569 "edit.applyRefactoring result", { | |
| 570 "status": isListOf(isRefactoringProblem), | |
| 571 "change": isSourceChange | |
| 572 }); | |
| 573 | |
| 574 /** | |
| 575 * edit.createRefactoring params | |
| 576 * | |
| 577 * { | |
| 578 * "kindId": RefactoringKind | |
| 579 * "file": FilePath | 547 * "file": FilePath |
| 580 * "offset": int | 548 * "offset": int |
| 581 * "length": int | 549 * "length": int |
| 582 * } | 550 * } |
| 583 */ | 551 */ |
| 584 final Matcher isEditCreateRefactoringParams = new MatchesJsonObject( | 552 final Matcher isEditGetAssistsParams = new MatchesJsonObject( |
| 585 "edit.createRefactoring params", { | 553 "edit.getAssists params", { |
| 586 "kindId": isRefactoringKind, | |
| 587 "file": isFilePath, | 554 "file": isFilePath, |
| 588 "offset": isInt, | 555 "offset": isInt, |
| 589 "length": isInt | 556 "length": isInt |
| 590 }); | 557 }); |
| 591 | 558 |
| 592 /** | 559 /** |
| 593 * edit.createRefactoring result | 560 * edit.getAssists result |
| 594 * | 561 * |
| 595 * { | 562 * { |
| 596 * "id": RefactoringId | 563 * "assists": List<SourceChange> |
| 597 * "status": List<RefactoringProblem> | |
| 598 * } | 564 * } |
| 599 */ | 565 */ |
| 600 final Matcher isEditCreateRefactoringResult = new MatchesJsonObject( | 566 final Matcher isEditGetAssistsResult = new MatchesJsonObject( |
| 601 "edit.createRefactoring result", { | 567 "edit.getAssists result", { |
| 602 "id": isRefactoringId, | 568 "assists": isListOf(isSourceChange) |
| 603 "status": isListOf(isRefactoringProblem) | |
| 604 }); | 569 }); |
| 605 | 570 |
| 606 /** | 571 /** |
| 607 * edit.deleteRefactoring params | 572 * edit.getAvailableRefactorings params |
| 608 * | |
| 609 * { | |
| 610 * "id": RefactoringId | |
| 611 * } | |
| 612 */ | |
| 613 final Matcher isEditDeleteRefactoringParams = new MatchesJsonObject( | |
| 614 "edit.deleteRefactoring params", { | |
| 615 "id": isRefactoringId | |
| 616 }); | |
| 617 | |
| 618 /** | |
| 619 * edit.deleteRefactoring result | |
| 620 */ | |
| 621 final Matcher isEditDeleteRefactoringResult = isNull; | |
| 622 | |
| 623 /** | |
| 624 * edit.getAssists params | |
| 625 * | 573 * |
| 626 * { | 574 * { |
| 627 * "file": FilePath | 575 * "file": FilePath |
| 628 * "offset": int | 576 * "offset": int |
| 629 * "length": int | 577 * "length": int |
| 630 * } | 578 * } |
| 631 */ | 579 */ |
| 632 final Matcher isEditGetAssistsParams = new MatchesJsonObject( | 580 final Matcher isEditGetAvailableRefactoringsParams = new MatchesJsonObject( |
| 633 "edit.getAssists params", { | 581 "edit.getAvailableRefactorings params", { |
| 634 "file": isFilePath, | 582 "file": isFilePath, |
| 635 "offset": isInt, | 583 "offset": isInt, |
| 636 "length": isInt | 584 "length": isInt |
| 637 }); | 585 }); |
| 638 | 586 |
| 639 /** | 587 /** |
| 640 * edit.getAssists result | 588 * edit.getAvailableRefactorings result |
| 641 * | 589 * |
| 642 * { | 590 * { |
| 643 * "assists": List<SourceChange> | 591 * "kinds": List<RefactoringKind> |
| 644 * } | 592 * } |
| 645 */ | 593 */ |
| 646 final Matcher isEditGetAssistsResult = new MatchesJsonObject( | 594 final Matcher isEditGetAvailableRefactoringsResult = new MatchesJsonObject( |
| 647 "edit.getAssists result", { | 595 "edit.getAvailableRefactorings result", { |
| 648 "assists": isListOf(isSourceChange) | 596 "kinds": isListOf(isRefactoringKind) |
| 649 }); | 597 }); |
| 650 | 598 |
| 651 /** | 599 /** |
| 652 * edit.getFixes params | 600 * edit.getFixes params |
| 653 * | 601 * |
| 654 * { | 602 * { |
| 655 * "file": FilePath | 603 * "file": FilePath |
| 656 * "offset": int | 604 * "offset": int |
| 657 * } | 605 * } |
| 658 */ | 606 */ |
| 659 final Matcher isEditGetFixesParams = new MatchesJsonObject( | 607 final Matcher isEditGetFixesParams = new MatchesJsonObject( |
| 660 "edit.getFixes params", { | 608 "edit.getFixes params", { |
| 661 "file": isFilePath, | 609 "file": isFilePath, |
| 662 "offset": isInt | 610 "offset": isInt |
| 663 }); | 611 }); |
| 664 | 612 |
| 665 /** | 613 /** |
| 666 * edit.getFixes result | 614 * edit.getFixes result |
| 667 * | 615 * |
| 668 * { | 616 * { |
| 669 * "fixes": List<ErrorFixes> | 617 * "fixes": List<ErrorFixes> |
| 670 * } | 618 * } |
| 671 */ | 619 */ |
| 672 final Matcher isEditGetFixesResult = new MatchesJsonObject( | 620 final Matcher isEditGetFixesResult = new MatchesJsonObject( |
| 673 "edit.getFixes result", { | 621 "edit.getFixes result", { |
| 674 "fixes": isListOf(isErrorFixes) | 622 "fixes": isListOf(isErrorFixes) |
| 675 }); | 623 }); |
| 676 | 624 |
| 677 /** | 625 /** |
| 678 * edit.getRefactorings params | 626 * edit.getRefactoring params |
| 679 * | 627 * |
| 680 * { | 628 * { |
| 629 * "kindId": RefactoringKind | |
| 681 * "file": FilePath | 630 * "file": FilePath |
| 682 * "offset": int | 631 * "offset": int |
| 683 * "length": int | 632 * "length": int |
| 633 * "validateOnly": bool | |
| 634 * "options": optional object | |
| 684 * } | 635 * } |
| 685 */ | 636 */ |
| 686 final Matcher isEditGetRefactoringsParams = new MatchesJsonObject( | 637 final Matcher isEditGetRefactoringParams = new MatchesJsonObject( |
| 687 "edit.getRefactorings params", { | 638 "edit.getRefactoring params", { |
| 639 "kindId": isRefactoringKind, | |
| 688 "file": isFilePath, | 640 "file": isFilePath, |
| 689 "offset": isInt, | 641 "offset": isInt, |
| 690 "length": isInt | 642 "length": isInt, |
| 643 "validateOnly": isBool | |
| 644 }, optionalFields: { | |
| 645 "options": isObject | |
| 691 }); | 646 }); |
| 692 | 647 |
| 693 /** | 648 /** |
| 694 * edit.getRefactorings result | 649 * edit.getRefactoring result |
| 695 * | 650 * |
| 696 * { | 651 * { |
| 697 * "kinds": List<RefactoringKind> | 652 * "status": List<RefactoringProblem> |
| 653 * "feedback": optional object | |
| 654 * "change": optional SourceChange | |
| 698 * } | 655 * } |
| 699 */ | 656 */ |
| 700 final Matcher isEditGetRefactoringsResult = new MatchesJsonObject( | 657 final Matcher isEditGetRefactoringResult = new MatchesJsonObject( |
| 701 "edit.getRefactorings result", { | 658 "edit.getRefactoring result", { |
| 702 "kinds": isListOf(isRefactoringKind) | 659 "status": isListOf(isRefactoringProblem) |
| 660 }, optionalFields: { | |
| 661 "feedback": isObject, | |
| 662 "change": isSourceChange | |
| 703 }); | 663 }); |
| 704 | 664 |
| 705 /** | 665 /** |
| 706 * edit.setRefactoringOptions params | |
| 707 * | |
| 708 * { | |
| 709 * "id": RefactoringId | |
| 710 * } | |
| 711 */ | |
| 712 final Matcher isEditSetRefactoringOptionsParams = new MatchesJsonObject( | |
| 713 "edit.setRefactoringOptions params", { | |
| 714 "id": isRefactoringId | |
| 715 }); | |
| 716 | |
| 717 /** | |
| 718 * edit.setRefactoringOptions result | |
| 719 * | |
| 720 * { | |
| 721 * "status": List<RefactoringProblem> | |
| 722 * } | |
| 723 */ | |
| 724 final Matcher isEditSetRefactoringOptionsResult = new MatchesJsonObject( | |
| 725 "edit.setRefactoringOptions result", { | |
| 726 "status": isListOf(isRefactoringProblem) | |
| 727 }); | |
| 728 | |
| 729 /** | |
| 730 * debug.createContext params | 666 * debug.createContext params |
| 731 * | 667 * |
| 732 * { | 668 * { |
| 733 * "contextRoot": FilePath | 669 * "contextRoot": FilePath |
| 734 * } | 670 * } |
| 735 */ | 671 */ |
| 736 final Matcher isDebugCreateContextParams = new MatchesJsonObject( | 672 final Matcher isDebugCreateContextParams = new MatchesJsonObject( |
| 737 "debug.createContext params", { | 673 "debug.createContext params", { |
| 738 "contextRoot": isFilePath | 674 "contextRoot": isFilePath |
| 739 }); | 675 }); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 873 "enableDeferredLoading": isBool, | 809 "enableDeferredLoading": isBool, |
| 874 "enableEnums": isBool, | 810 "enableEnums": isBool, |
| 875 "generateDart2jsHints": isBool, | 811 "generateDart2jsHints": isBool, |
| 876 "generateHints": isBool | 812 "generateHints": isBool |
| 877 }); | 813 }); |
| 878 | 814 |
| 879 /** | 815 /** |
| 880 * AnalysisService | 816 * AnalysisService |
| 881 * | 817 * |
| 882 * enum { | 818 * enum { |
| 883 * ERRORS | |
| 884 * FOLDING | 819 * FOLDING |
| 885 * HIGHLIGHTS | 820 * HIGHLIGHTS |
| 886 * NAVIGATION | 821 * NAVIGATION |
| 887 * OCCURRENCES | 822 * OCCURRENCES |
| 888 * OUTLINE | 823 * OUTLINE |
| 889 * OVERRIDES | 824 * OVERRIDES |
| 890 * } | 825 * } |
| 891 */ | 826 */ |
| 892 final Matcher isAnalysisService = isIn([ | 827 final Matcher isAnalysisService = isIn([ |
| 893 "ERRORS", | |
| 894 "FOLDING", | 828 "FOLDING", |
| 895 "HIGHLIGHTS", | 829 "HIGHLIGHTS", |
| 896 "NAVIGATION", | 830 "NAVIGATION", |
| 897 "OCCURRENCES", | 831 "OCCURRENCES", |
| 898 "OUTLINE", | 832 "OUTLINE", |
| 899 "OVERRIDES" | 833 "OVERRIDES" |
| 900 ]); | 834 ]); |
| 901 | 835 |
| 902 /** | 836 /** |
| 903 * AnalysisStatus | 837 * AnalysisStatus |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 988 * ARGUMENT_LIST | 922 * ARGUMENT_LIST |
| 989 * CLASS | 923 * CLASS |
| 990 * CLASS_ALIAS | 924 * CLASS_ALIAS |
| 991 * CONSTRUCTOR | 925 * CONSTRUCTOR |
| 992 * FIELD | 926 * FIELD |
| 993 * FUNCTION | 927 * FUNCTION |
| 994 * FUNCTION_TYPE_ALIAS | 928 * FUNCTION_TYPE_ALIAS |
| 995 * GETTER | 929 * GETTER |
| 996 * IMPORT | 930 * IMPORT |
| 997 * LIBRARY_PREFIX | 931 * LIBRARY_PREFIX |
| 932 * LOCAL_VARIABLE | |
| 998 * METHOD | 933 * METHOD |
| 999 * METHOD_NAME | 934 * METHOD_NAME |
| 1000 * NAMED_ARGUMENT | 935 * NAMED_ARGUMENT |
| 1001 * OPTIONAL_ARGUMENT | 936 * OPTIONAL_ARGUMENT |
| 1002 * PARAMETER | 937 * PARAMETER |
| 1003 * SETTER | 938 * SETTER |
| 1004 * TOP_LEVEL_VARIABLE | 939 * TOP_LEVEL_VARIABLE |
| 1005 * TYPE_PARAMETER | 940 * TYPE_PARAMETER |
| 1006 * VARIABLE | |
| 1007 * } | 941 * } |
| 1008 */ | 942 */ |
| 1009 final Matcher isCompletionSuggestionKind = isIn([ | 943 final Matcher isCompletionSuggestionKind = isIn([ |
| 1010 "ARGUMENT_LIST", | 944 "ARGUMENT_LIST", |
| 1011 "CLASS", | 945 "CLASS", |
| 1012 "CLASS_ALIAS", | 946 "CLASS_ALIAS", |
| 1013 "CONSTRUCTOR", | 947 "CONSTRUCTOR", |
| 1014 "FIELD", | 948 "FIELD", |
| 1015 "FUNCTION", | 949 "FUNCTION", |
| 1016 "FUNCTION_TYPE_ALIAS", | 950 "FUNCTION_TYPE_ALIAS", |
| 1017 "GETTER", | 951 "GETTER", |
| 1018 "IMPORT", | 952 "IMPORT", |
| 1019 "LIBRARY_PREFIX", | 953 "LIBRARY_PREFIX", |
| 954 "LOCAL_VARIABLE", | |
| 1020 "METHOD", | 955 "METHOD", |
| 1021 "METHOD_NAME", | 956 "METHOD_NAME", |
| 1022 "NAMED_ARGUMENT", | 957 "NAMED_ARGUMENT", |
| 1023 "OPTIONAL_ARGUMENT", | 958 "OPTIONAL_ARGUMENT", |
| 1024 "PARAMETER", | 959 "PARAMETER", |
| 1025 "SETTER", | 960 "SETTER", |
| 1026 "TOP_LEVEL_VARIABLE", | 961 "TOP_LEVEL_VARIABLE", |
| 1027 "TYPE_PARAMETER", | 962 "TYPE_PARAMETER" |
| 1028 "VARIABLE" | |
| 1029 ]); | 963 ]); |
| 1030 | 964 |
| 1031 /** | 965 /** |
| 1032 * ContentChange | 966 * ContentChange |
| 1033 * | 967 * |
| 1034 * { | 968 * { |
| 1035 * "content": String | 969 * "content": String |
| 1036 * "offset": optional int | 970 * "offset": optional int |
| 1037 * "oldLength": optional int | 971 * "oldLength": optional int |
| 1038 * "newLength": optional int | 972 * "newLength": optional int |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 1064 final Matcher isDebugService = isIn([ | 998 final Matcher isDebugService = isIn([ |
| 1065 "LAUNCH_DATA" | 999 "LAUNCH_DATA" |
| 1066 ]); | 1000 ]); |
| 1067 | 1001 |
| 1068 /** | 1002 /** |
| 1069 * Element | 1003 * Element |
| 1070 * | 1004 * |
| 1071 * { | 1005 * { |
| 1072 * "kind": ElementKind | 1006 * "kind": ElementKind |
| 1073 * "name": String | 1007 * "name": String |
| 1074 * "location": Location | 1008 * "location": optional Location |
| 1075 * "flags": int | 1009 * "flags": int |
| 1076 * "parameters": optional String | 1010 * "parameters": optional String |
| 1077 * "returnType": optional String | 1011 * "returnType": optional String |
| 1078 * } | 1012 * } |
| 1079 */ | 1013 */ |
| 1080 final Matcher isElement = new MatchesJsonObject( | 1014 final Matcher isElement = new MatchesJsonObject( |
| 1081 "Element", { | 1015 "Element", { |
| 1082 "kind": isElementKind, | 1016 "kind": isElementKind, |
| 1083 "name": isString, | 1017 "name": isString, |
| 1084 "location": isLocation, | |
| 1085 "flags": isInt | 1018 "flags": isInt |
| 1086 }, optionalFields: { | 1019 }, optionalFields: { |
| 1020 "location": isLocation, | |
| 1087 "parameters": isString, | 1021 "parameters": isString, |
| 1088 "returnType": isString | 1022 "returnType": isString |
| 1089 }); | 1023 }); |
| 1090 | 1024 |
| 1091 /** | 1025 /** |
| 1092 * ElementKind | 1026 * ElementKind |
| 1093 * | 1027 * |
| 1094 * enum { | 1028 * enum { |
| 1095 * CLASS | 1029 * CLASS |
| 1096 * CLASS_TYPE_ALIAS | 1030 * CLASS_TYPE_ALIAS |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1128 "TYPE_PARAMETER", | 1062 "TYPE_PARAMETER", |
| 1129 "UNKNOWN", | 1063 "UNKNOWN", |
| 1130 "UNIT_TEST_GROUP", | 1064 "UNIT_TEST_GROUP", |
| 1131 "UNIT_TEST_TEST" | 1065 "UNIT_TEST_TEST" |
| 1132 ]); | 1066 ]); |
| 1133 | 1067 |
| 1134 /** | 1068 /** |
| 1135 * Error | 1069 * Error |
| 1136 * | 1070 * |
| 1137 * { | 1071 * { |
| 1138 * "code": String | 1072 * "code": int |
| 1139 * "message": String | 1073 * "message": String |
| 1140 * "data": optional object | 1074 * "data": optional object |
| 1141 * } | 1075 * } |
| 1142 */ | 1076 */ |
| 1143 final Matcher isError = new MatchesJsonObject( | 1077 final Matcher isError = new MatchesJsonObject( |
| 1144 "Error", { | 1078 "Error", { |
| 1145 // TODO(paulberry): the API spec says "code" should be a string, but the | |
| 1146 // server is currently outputting integers. | |
| 1147 "code": isInt, | 1079 "code": isInt, |
| 1148 "message": isString | 1080 "message": isString |
| 1149 }, optionalFields: { | 1081 }, optionalFields: { |
| 1150 "data": isObject | 1082 "data": isObject |
| 1151 }); | 1083 }); |
| 1152 | 1084 |
| 1153 /** | 1085 /** |
| 1154 * ErrorFixes | 1086 * ErrorFixes |
| 1155 * | 1087 * |
| 1156 * { | 1088 * { |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1391 "containingLibraryName": isString, | 1323 "containingLibraryName": isString, |
| 1392 "dartdoc": isString, | 1324 "dartdoc": isString, |
| 1393 "elementDescription": isString, | 1325 "elementDescription": isString, |
| 1394 "elementKind": isString, | 1326 "elementKind": isString, |
| 1395 "parameter": isString, | 1327 "parameter": isString, |
| 1396 "propagatedType": isString, | 1328 "propagatedType": isString, |
| 1397 "staticType": isString | 1329 "staticType": isString |
| 1398 }); | 1330 }); |
| 1399 | 1331 |
| 1400 /** | 1332 /** |
| 1333 * LinkedEditGroup | |
| 1334 * | |
| 1335 * { | |
| 1336 * "positions": List<Position> | |
| 1337 * "length": int | |
| 1338 * "suggestions": List<LinkedEditSuggestion> | |
| 1339 * } | |
| 1340 */ | |
| 1341 final Matcher isLinkedEditGroup = new MatchesJsonObject( | |
| 1342 "LinkedEditGroup", { | |
| 1343 "positions": isListOf(isPosition), | |
| 1344 "length": isInt, | |
| 1345 "suggestions": isListOf(isLinkedEditSuggestion) | |
| 1346 }); | |
| 1347 | |
| 1348 /** | |
| 1349 * LinkedEditSuggestion | |
| 1350 * | |
| 1351 * { | |
| 1352 * "value": String | |
| 1353 * "kind": LinkedEditSuggestionKind | |
| 1354 * } | |
| 1355 */ | |
| 1356 final Matcher isLinkedEditSuggestion = new MatchesJsonObject( | |
| 1357 "LinkedEditSuggestion", { | |
| 1358 "value": isString, | |
| 1359 "kind": isLinkedEditSuggestionKind | |
| 1360 }); | |
| 1361 | |
| 1362 /** | |
| 1363 * LinkedEditSuggestionKind | |
| 1364 * | |
| 1365 * enum { | |
| 1366 * METHOD | |
| 1367 * PARAMETER | |
| 1368 * TYPE | |
| 1369 * VARIABLE | |
| 1370 * } | |
| 1371 */ | |
| 1372 final Matcher isLinkedEditSuggestionKind = isIn([ | |
| 1373 "METHOD", | |
| 1374 "PARAMETER", | |
| 1375 "TYPE", | |
| 1376 "VARIABLE" | |
| 1377 ]); | |
| 1378 | |
| 1379 /** | |
| 1401 * Location | 1380 * Location |
| 1402 * | 1381 * |
| 1403 * { | 1382 * { |
| 1404 * "file": FilePath | 1383 * "file": FilePath |
| 1405 * "offset": int | 1384 * "offset": int |
| 1406 * "length": int | 1385 * "length": int |
| 1407 * "startLine": int | 1386 * "startLine": int |
| 1408 * "startColumn": int | 1387 * "startColumn": int |
| 1409 * } | 1388 * } |
| 1410 */ | 1389 */ |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1509 * "name": String | 1488 * "name": String |
| 1510 * } | 1489 * } |
| 1511 */ | 1490 */ |
| 1512 final Matcher isParameter = new MatchesJsonObject( | 1491 final Matcher isParameter = new MatchesJsonObject( |
| 1513 "Parameter", { | 1492 "Parameter", { |
| 1514 "type": isString, | 1493 "type": isString, |
| 1515 "name": isString | 1494 "name": isString |
| 1516 }); | 1495 }); |
| 1517 | 1496 |
| 1518 /** | 1497 /** |
| 1498 * Position | |
| 1499 * | |
| 1500 * { | |
| 1501 * "file": FilePath | |
| 1502 * "offset": int | |
| 1503 * } | |
| 1504 */ | |
| 1505 final Matcher isPosition = new MatchesJsonObject( | |
| 1506 "Position", { | |
| 1507 "file": isFilePath, | |
| 1508 "offset": isInt | |
| 1509 }); | |
| 1510 | |
| 1511 /** | |
| 1519 * RefactoringId | 1512 * RefactoringId |
| 1520 * | 1513 * |
| 1521 * String | 1514 * String |
| 1522 */ | 1515 */ |
| 1523 final Matcher isRefactoringId = isString; | 1516 final Matcher isRefactoringId = isString; |
| 1524 | 1517 |
| 1525 /** | 1518 /** |
| 1526 * RefactoringKind | 1519 * RefactoringKind |
| 1527 * | 1520 * |
| 1528 * enum { | 1521 * enum { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1634 final Matcher isServerService = isIn([ | 1627 final Matcher isServerService = isIn([ |
| 1635 "STATUS" | 1628 "STATUS" |
| 1636 ]); | 1629 ]); |
| 1637 | 1630 |
| 1638 /** | 1631 /** |
| 1639 * SourceChange | 1632 * SourceChange |
| 1640 * | 1633 * |
| 1641 * { | 1634 * { |
| 1642 * "message": String | 1635 * "message": String |
| 1643 * "edits": List<SourceFileEdit> | 1636 * "edits": List<SourceFileEdit> |
| 1637 * "linkedEditGroups": List<LinkedEditGroup> | |
| 1638 * "selection": optional Position | |
| 1644 * } | 1639 * } |
| 1645 */ | 1640 */ |
| 1646 final Matcher isSourceChange = new MatchesJsonObject( | 1641 final Matcher isSourceChange = new MatchesJsonObject( |
| 1647 "SourceChange", { | 1642 "SourceChange", { |
| 1648 "message": isString, | 1643 "message": isString, |
| 1649 "edits": isListOf(isSourceFileEdit) | 1644 "edits": isListOf(isSourceFileEdit), |
| 1645 "linkedEditGroups": isListOf(isLinkedEditGroup) | |
| 1646 }, optionalFields: { | |
| 1647 "selection": isPosition | |
| 1650 }); | 1648 }); |
| 1651 | 1649 |
| 1652 /** | 1650 /** |
| 1653 * SourceEdit | 1651 * SourceEdit |
| 1654 * | 1652 * |
| 1655 * { | 1653 * { |
| 1656 * "offset": int | 1654 * "offset": int |
| 1657 * "length": int | 1655 * "length": int |
| 1658 * "replacement": String | 1656 * "replacement": String |
| 1659 * } | 1657 * } |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 1679 "edits": isListOf(isSourceEdit) | 1677 "edits": isListOf(isSourceEdit) |
| 1680 }); | 1678 }); |
| 1681 | 1679 |
| 1682 /** | 1680 /** |
| 1683 * TypeHierarchyItem | 1681 * TypeHierarchyItem |
| 1684 * | 1682 * |
| 1685 * { | 1683 * { |
| 1686 * "classElement": Element | 1684 * "classElement": Element |
| 1687 * "displayName": optional String | 1685 * "displayName": optional String |
| 1688 * "memberElement": optional Element | 1686 * "memberElement": optional Element |
| 1689 * "superclass": optional TypeHierarchyItem | 1687 * "superclass": optional int |
| 1690 * "interfaces": List<TypeHierarchyItem> | 1688 * "interfaces": List<int> |
| 1691 * "mixins": List<TypeHierarchyItem> | 1689 * "mixins": List<int> |
| 1692 * "subclasses": List<TypeHierarchyItem> | 1690 * "subclasses": List<int> |
| 1693 * } | 1691 * } |
| 1694 */ | 1692 */ |
| 1695 final Matcher isTypeHierarchyItem = new MatchesJsonObject( | 1693 final Matcher isTypeHierarchyItem = new MatchesJsonObject( |
| 1696 "TypeHierarchyItem", { | 1694 "TypeHierarchyItem", { |
| 1697 "classElement": isElement, | 1695 "classElement": isElement, |
| 1698 "interfaces": isListOf(isTypeHierarchyItem), | 1696 "interfaces": isListOf(isInt), |
| 1699 "mixins": isListOf(isTypeHierarchyItem), | 1697 "mixins": isListOf(isInt), |
| 1700 "subclasses": isListOf(isTypeHierarchyItem) | 1698 "subclasses": isListOf(isInt) |
| 1701 }, optionalFields: { | 1699 }, optionalFields: { |
| 1702 "displayName": isString, | 1700 "displayName": isString, |
| 1703 "memberElement": isElement, | 1701 "memberElement": isElement, |
| 1704 "superclass": isTypeHierarchyItem | 1702 "superclass": isInt |
| 1705 }); | 1703 }); |
| 1706 | 1704 |
| 1705 /** | |
| 1706 * convertGetterToMethod feedback | |
| 1707 */ | |
| 1708 final Matcher isConvertGetterToMethodFeedback = isNull; | |
| 1709 | |
| 1710 /** | |
| 1711 * convertGetterToMethod options | |
| 1712 */ | |
| 1713 final Matcher isConvertGetterToMethodOptions = isNull; | |
| 1714 | |
| 1715 /** | |
| 1716 * convertMethodToGetter feedback | |
| 1717 */ | |
| 1718 final Matcher isConvertMethodToGetterFeedback = isNull; | |
| 1719 | |
| 1720 /** | |
| 1721 * convertMethodToGetter options | |
| 1722 */ | |
| 1723 final Matcher isConvertMethodToGetterOptions = isNull; | |
| 1724 | |
| 1725 /** | |
| 1726 * extractLocalVariable feedback | |
| 1727 * | |
| 1728 * { | |
| 1729 * "names": List<String> | |
| 1730 * "offsets": List<int> | |
| 1731 * "lengths": List<int> | |
| 1732 * } | |
| 1733 */ | |
| 1734 final Matcher isExtractLocalVariableFeedback = new MatchesJsonObject( | |
| 1735 "extractLocalVariable feedback", { | |
| 1736 "names": isListOf(isString), | |
| 1737 "offsets": isListOf(isInt), | |
| 1738 "lengths": isListOf(isInt) | |
| 1739 }); | |
| 1740 | |
| 1741 /** | |
| 1742 * extractLocalVariable options | |
| 1743 * | |
| 1744 * { | |
| 1745 * "name": String | |
| 1746 * "extractAll": bool | |
| 1747 * } | |
| 1748 */ | |
| 1749 final Matcher isExtractLocalVariableOptions = new MatchesJsonObject( | |
| 1750 "extractLocalVariable options", { | |
| 1751 "name": isString, | |
| 1752 "extractAll": isBool | |
| 1753 }); | |
| 1754 | |
| 1755 /** | |
| 1756 * extractMethod feedback | |
| 1757 * | |
| 1758 * { | |
| 1759 * "offset": int | |
| 1760 * "length": int | |
| 1761 * "returnType": String | |
| 1762 * "names": List<String> | |
| 1763 * "canCreateGetter": bool | |
| 1764 * "parameters": List<Parameter> | |
| 1765 * "occurrences": int | |
| 1766 * "offsets": List<int> | |
| 1767 * "lengths": List<int> | |
| 1768 * } | |
| 1769 */ | |
| 1770 final Matcher isExtractMethodFeedback = new MatchesJsonObject( | |
| 1771 "extractMethod feedback", { | |
| 1772 "offset": isInt, | |
| 1773 "length": isInt, | |
| 1774 "returnType": isString, | |
| 1775 "names": isListOf(isString), | |
| 1776 "canCreateGetter": isBool, | |
| 1777 "parameters": isListOf(isParameter), | |
| 1778 "occurrences": isInt, | |
| 1779 "offsets": isListOf(isInt), | |
| 1780 "lengths": isListOf(isInt) | |
| 1781 }); | |
| 1782 | |
| 1783 /** | |
| 1784 * extractMethod options | |
| 1785 * | |
| 1786 * { | |
| 1787 * "returnType": String | |
| 1788 * "createGetter": bool | |
| 1789 * "name": String | |
| 1790 * "parameters": List<Parameter> | |
| 1791 * "extractAll": bool | |
| 1792 * } | |
| 1793 */ | |
| 1794 final Matcher isExtractMethodOptions = new MatchesJsonObject( | |
| 1795 "extractMethod options", { | |
| 1796 "returnType": isString, | |
| 1797 "createGetter": isBool, | |
| 1798 "name": isString, | |
| 1799 "parameters": isListOf(isParameter), | |
| 1800 "extractAll": isBool | |
| 1801 }); | |
| 1802 | |
| 1803 /** | |
| 1804 * inlineLocalVariable feedback | |
| 1805 */ | |
| 1806 final Matcher isInlineLocalVariableFeedback = isNull; | |
| 1807 | |
| 1808 /** | |
| 1809 * inlineLocalVariable options | |
| 1810 */ | |
| 1811 final Matcher isInlineLocalVariableOptions = isNull; | |
| 1812 | |
| 1813 /** | |
| 1814 * inlineMethod feedback | |
| 1815 */ | |
| 1816 final Matcher isInlineMethodFeedback = isNull; | |
| 1817 | |
| 1818 /** | |
| 1819 * inlineMethod options | |
| 1820 * | |
| 1821 * { | |
| 1822 * "deleteSource": bool | |
| 1823 * "inlineAll": bool | |
| 1824 * } | |
| 1825 */ | |
| 1826 final Matcher isInlineMethodOptions = new MatchesJsonObject( | |
| 1827 "inlineMethod options", { | |
| 1828 "deleteSource": isBool, | |
| 1829 "inlineAll": isBool | |
| 1830 }); | |
| 1831 | |
| 1832 /** | |
| 1833 * rename feedback | |
| 1834 * | |
| 1835 * { | |
| 1836 * "offset": int | |
| 1837 * "length": int | |
| 1838 * } | |
| 1839 */ | |
| 1840 final Matcher isRenameFeedback = new MatchesJsonObject( | |
| 1841 "rename feedback", { | |
| 1842 "offset": isInt, | |
| 1843 "length": isInt | |
| 1844 }); | |
| 1845 | |
| 1846 /** | |
| 1847 * rename options | |
| 1848 * | |
| 1849 * { | |
| 1850 * "newName": String | |
| 1851 * } | |
| 1852 */ | |
| 1853 final Matcher isRenameOptions = new MatchesJsonObject( | |
| 1854 "rename options", { | |
| 1855 "newName": isString | |
| 1856 }); | |
| 1857 | |
| OLD | NEW |