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 |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // | 4 // |
5 // This file has been automatically generated. Please do not edit it manually. | 5 // This file has been automatically generated. Please do not edit it manually. |
6 // To regenerate the file, use the script | 6 // To regenerate the file, use the script |
7 // "pkg/analysis_server/spec/generate_files". | 7 // "pkg/analysis_server/spec/generate_files". |
8 | 8 |
9 part of protocol2; | 9 part of protocol2; |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 return new ServerGetVersionResult.fromJson( | 44 return new ServerGetVersionResult.fromJson( |
45 new ResponseDecoder(), "result", response.result); | 45 new ResponseDecoder(), "result", response.result); |
46 } | 46 } |
47 | 47 |
48 Map<String, dynamic> toJson() { | 48 Map<String, dynamic> toJson() { |
49 Map<String, dynamic> result = {}; | 49 Map<String, dynamic> result = {}; |
50 result["version"] = version; | 50 result["version"] = version; |
51 return result; | 51 return result; |
52 } | 52 } |
53 | 53 |
| 54 Response toResponse(String id) { |
| 55 return new Response(id, result: toJson()); |
| 56 } |
| 57 |
54 @override | 58 @override |
55 String toString() => JSON.encode(toJson()); | 59 String toString() => JSON.encode(toJson()); |
56 | 60 |
57 @override | 61 @override |
58 bool operator==(other) { | 62 bool operator==(other) { |
59 if (other is ServerGetVersionResult) { | 63 if (other is ServerGetVersionResult) { |
60 return version == other.version; | 64 return version == other.version; |
61 } | 65 } |
62 return false; | 66 return false; |
63 } | 67 } |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 return new AnalysisGetErrorsResult.fromJson( | 399 return new AnalysisGetErrorsResult.fromJson( |
396 new ResponseDecoder(), "result", response.result); | 400 new ResponseDecoder(), "result", response.result); |
397 } | 401 } |
398 | 402 |
399 Map<String, dynamic> toJson() { | 403 Map<String, dynamic> toJson() { |
400 Map<String, dynamic> result = {}; | 404 Map<String, dynamic> result = {}; |
401 result["errors"] = errors.map((AnalysisError value) => value.toJson()).toLis
t(); | 405 result["errors"] = errors.map((AnalysisError value) => value.toJson()).toLis
t(); |
402 return result; | 406 return result; |
403 } | 407 } |
404 | 408 |
| 409 Response toResponse(String id) { |
| 410 return new Response(id, result: toJson()); |
| 411 } |
| 412 |
405 @override | 413 @override |
406 String toString() => JSON.encode(toJson()); | 414 String toString() => JSON.encode(toJson()); |
407 | 415 |
408 @override | 416 @override |
409 bool operator==(other) { | 417 bool operator==(other) { |
410 if (other is AnalysisGetErrorsResult) { | 418 if (other is AnalysisGetErrorsResult) { |
411 return _listEqual(errors, other.errors, (AnalysisError a, AnalysisError b)
=> a == b); | 419 return _listEqual(errors, other.errors, (AnalysisError a, AnalysisError b)
=> a == b); |
412 } | 420 } |
413 return false; | 421 return false; |
414 } | 422 } |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 return new AnalysisGetHoverResult.fromJson( | 550 return new AnalysisGetHoverResult.fromJson( |
543 new ResponseDecoder(), "result", response.result); | 551 new ResponseDecoder(), "result", response.result); |
544 } | 552 } |
545 | 553 |
546 Map<String, dynamic> toJson() { | 554 Map<String, dynamic> toJson() { |
547 Map<String, dynamic> result = {}; | 555 Map<String, dynamic> result = {}; |
548 result["hovers"] = hovers.map((HoverInformation value) => value.toJson()).to
List(); | 556 result["hovers"] = hovers.map((HoverInformation value) => value.toJson()).to
List(); |
549 return result; | 557 return result; |
550 } | 558 } |
551 | 559 |
| 560 Response toResponse(String id) { |
| 561 return new Response(id, result: toJson()); |
| 562 } |
| 563 |
552 @override | 564 @override |
553 String toString() => JSON.encode(toJson()); | 565 String toString() => JSON.encode(toJson()); |
554 | 566 |
555 @override | 567 @override |
556 bool operator==(other) { | 568 bool operator==(other) { |
557 if (other is AnalysisGetHoverResult) { | 569 if (other is AnalysisGetHoverResult) { |
558 return _listEqual(hovers, other.hovers, (HoverInformation a, HoverInformat
ion b) => a == b); | 570 return _listEqual(hovers, other.hovers, (HoverInformation a, HoverInformat
ion b) => a == b); |
559 } | 571 } |
560 return false; | 572 return false; |
561 } | 573 } |
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1643 return new CompletionGetSuggestionsResult.fromJson( | 1655 return new CompletionGetSuggestionsResult.fromJson( |
1644 new ResponseDecoder(), "result", response.result); | 1656 new ResponseDecoder(), "result", response.result); |
1645 } | 1657 } |
1646 | 1658 |
1647 Map<String, dynamic> toJson() { | 1659 Map<String, dynamic> toJson() { |
1648 Map<String, dynamic> result = {}; | 1660 Map<String, dynamic> result = {}; |
1649 result["id"] = id; | 1661 result["id"] = id; |
1650 return result; | 1662 return result; |
1651 } | 1663 } |
1652 | 1664 |
| 1665 Response toResponse(String id) { |
| 1666 return new Response(id, result: toJson()); |
| 1667 } |
| 1668 |
1653 @override | 1669 @override |
1654 String toString() => JSON.encode(toJson()); | 1670 String toString() => JSON.encode(toJson()); |
1655 | 1671 |
1656 @override | 1672 @override |
1657 bool operator==(other) { | 1673 bool operator==(other) { |
1658 if (other is CompletionGetSuggestionsResult) { | 1674 if (other is CompletionGetSuggestionsResult) { |
1659 return id == other.id; | 1675 return id == other.id; |
1660 } | 1676 } |
1661 return false; | 1677 return false; |
1662 } | 1678 } |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1951 | 1967 |
1952 Map<String, dynamic> toJson() { | 1968 Map<String, dynamic> toJson() { |
1953 Map<String, dynamic> result = {}; | 1969 Map<String, dynamic> result = {}; |
1954 result["id"] = id; | 1970 result["id"] = id; |
1955 if (element != null) { | 1971 if (element != null) { |
1956 result["element"] = element.toJson(); | 1972 result["element"] = element.toJson(); |
1957 } | 1973 } |
1958 return result; | 1974 return result; |
1959 } | 1975 } |
1960 | 1976 |
| 1977 Response toResponse(String id) { |
| 1978 return new Response(id, result: toJson()); |
| 1979 } |
| 1980 |
1961 @override | 1981 @override |
1962 String toString() => JSON.encode(toJson()); | 1982 String toString() => JSON.encode(toJson()); |
1963 | 1983 |
1964 @override | 1984 @override |
1965 bool operator==(other) { | 1985 bool operator==(other) { |
1966 if (other is SearchFindElementReferencesResult) { | 1986 if (other is SearchFindElementReferencesResult) { |
1967 return id == other.id && | 1987 return id == other.id && |
1968 element == other.element; | 1988 element == other.element; |
1969 } | 1989 } |
1970 return false; | 1990 return false; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2081 return new SearchFindMemberDeclarationsResult.fromJson( | 2101 return new SearchFindMemberDeclarationsResult.fromJson( |
2082 new ResponseDecoder(), "result", response.result); | 2102 new ResponseDecoder(), "result", response.result); |
2083 } | 2103 } |
2084 | 2104 |
2085 Map<String, dynamic> toJson() { | 2105 Map<String, dynamic> toJson() { |
2086 Map<String, dynamic> result = {}; | 2106 Map<String, dynamic> result = {}; |
2087 result["id"] = id; | 2107 result["id"] = id; |
2088 return result; | 2108 return result; |
2089 } | 2109 } |
2090 | 2110 |
| 2111 Response toResponse(String id) { |
| 2112 return new Response(id, result: toJson()); |
| 2113 } |
| 2114 |
2091 @override | 2115 @override |
2092 String toString() => JSON.encode(toJson()); | 2116 String toString() => JSON.encode(toJson()); |
2093 | 2117 |
2094 @override | 2118 @override |
2095 bool operator==(other) { | 2119 bool operator==(other) { |
2096 if (other is SearchFindMemberDeclarationsResult) { | 2120 if (other is SearchFindMemberDeclarationsResult) { |
2097 return id == other.id; | 2121 return id == other.id; |
2098 } | 2122 } |
2099 return false; | 2123 return false; |
2100 } | 2124 } |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2209 return new SearchFindMemberReferencesResult.fromJson( | 2233 return new SearchFindMemberReferencesResult.fromJson( |
2210 new ResponseDecoder(), "result", response.result); | 2234 new ResponseDecoder(), "result", response.result); |
2211 } | 2235 } |
2212 | 2236 |
2213 Map<String, dynamic> toJson() { | 2237 Map<String, dynamic> toJson() { |
2214 Map<String, dynamic> result = {}; | 2238 Map<String, dynamic> result = {}; |
2215 result["id"] = id; | 2239 result["id"] = id; |
2216 return result; | 2240 return result; |
2217 } | 2241 } |
2218 | 2242 |
| 2243 Response toResponse(String id) { |
| 2244 return new Response(id, result: toJson()); |
| 2245 } |
| 2246 |
2219 @override | 2247 @override |
2220 String toString() => JSON.encode(toJson()); | 2248 String toString() => JSON.encode(toJson()); |
2221 | 2249 |
2222 @override | 2250 @override |
2223 bool operator==(other) { | 2251 bool operator==(other) { |
2224 if (other is SearchFindMemberReferencesResult) { | 2252 if (other is SearchFindMemberReferencesResult) { |
2225 return id == other.id; | 2253 return id == other.id; |
2226 } | 2254 } |
2227 return false; | 2255 return false; |
2228 } | 2256 } |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2338 return new SearchFindTopLevelDeclarationsResult.fromJson( | 2366 return new SearchFindTopLevelDeclarationsResult.fromJson( |
2339 new ResponseDecoder(), "result", response.result); | 2367 new ResponseDecoder(), "result", response.result); |
2340 } | 2368 } |
2341 | 2369 |
2342 Map<String, dynamic> toJson() { | 2370 Map<String, dynamic> toJson() { |
2343 Map<String, dynamic> result = {}; | 2371 Map<String, dynamic> result = {}; |
2344 result["id"] = id; | 2372 result["id"] = id; |
2345 return result; | 2373 return result; |
2346 } | 2374 } |
2347 | 2375 |
| 2376 Response toResponse(String id) { |
| 2377 return new Response(id, result: toJson()); |
| 2378 } |
| 2379 |
2348 @override | 2380 @override |
2349 String toString() => JSON.encode(toJson()); | 2381 String toString() => JSON.encode(toJson()); |
2350 | 2382 |
2351 @override | 2383 @override |
2352 bool operator==(other) { | 2384 bool operator==(other) { |
2353 if (other is SearchFindTopLevelDeclarationsResult) { | 2385 if (other is SearchFindTopLevelDeclarationsResult) { |
2354 return id == other.id; | 2386 return id == other.id; |
2355 } | 2387 } |
2356 return false; | 2388 return false; |
2357 } | 2389 } |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2490 } | 2522 } |
2491 | 2523 |
2492 Map<String, dynamic> toJson() { | 2524 Map<String, dynamic> toJson() { |
2493 Map<String, dynamic> result = {}; | 2525 Map<String, dynamic> result = {}; |
2494 if (hierarchyItems != null) { | 2526 if (hierarchyItems != null) { |
2495 result["hierarchyItems"] = hierarchyItems.map((TypeHierarchyItem value) =>
value.toJson()).toList(); | 2527 result["hierarchyItems"] = hierarchyItems.map((TypeHierarchyItem value) =>
value.toJson()).toList(); |
2496 } | 2528 } |
2497 return result; | 2529 return result; |
2498 } | 2530 } |
2499 | 2531 |
| 2532 Response toResponse(String id) { |
| 2533 return new Response(id, result: toJson()); |
| 2534 } |
| 2535 |
2500 @override | 2536 @override |
2501 String toString() => JSON.encode(toJson()); | 2537 String toString() => JSON.encode(toJson()); |
2502 | 2538 |
2503 @override | 2539 @override |
2504 bool operator==(other) { | 2540 bool operator==(other) { |
2505 if (other is SearchGetTypeHierarchyResult) { | 2541 if (other is SearchGetTypeHierarchyResult) { |
2506 return _listEqual(hierarchyItems, other.hierarchyItems, (TypeHierarchyItem
a, TypeHierarchyItem b) => a == b); | 2542 return _listEqual(hierarchyItems, other.hierarchyItems, (TypeHierarchyItem
a, TypeHierarchyItem b) => a == b); |
2507 } | 2543 } |
2508 return false; | 2544 return false; |
2509 } | 2545 } |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2741 return new EditGetAssistsResult.fromJson( | 2777 return new EditGetAssistsResult.fromJson( |
2742 new ResponseDecoder(), "result", response.result); | 2778 new ResponseDecoder(), "result", response.result); |
2743 } | 2779 } |
2744 | 2780 |
2745 Map<String, dynamic> toJson() { | 2781 Map<String, dynamic> toJson() { |
2746 Map<String, dynamic> result = {}; | 2782 Map<String, dynamic> result = {}; |
2747 result["assists"] = assists.map((SourceChange value) => value.toJson()).toLi
st(); | 2783 result["assists"] = assists.map((SourceChange value) => value.toJson()).toLi
st(); |
2748 return result; | 2784 return result; |
2749 } | 2785 } |
2750 | 2786 |
| 2787 Response toResponse(String id) { |
| 2788 return new Response(id, result: toJson()); |
| 2789 } |
| 2790 |
2751 @override | 2791 @override |
2752 String toString() => JSON.encode(toJson()); | 2792 String toString() => JSON.encode(toJson()); |
2753 | 2793 |
2754 @override | 2794 @override |
2755 bool operator==(other) { | 2795 bool operator==(other) { |
2756 if (other is EditGetAssistsResult) { | 2796 if (other is EditGetAssistsResult) { |
2757 return _listEqual(assists, other.assists, (SourceChange a, SourceChange b)
=> a == b); | 2797 return _listEqual(assists, other.assists, (SourceChange a, SourceChange b)
=> a == b); |
2758 } | 2798 } |
2759 return false; | 2799 return false; |
2760 } | 2800 } |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2899 return new EditGetAvailableRefactoringsResult.fromJson( | 2939 return new EditGetAvailableRefactoringsResult.fromJson( |
2900 new ResponseDecoder(), "result", response.result); | 2940 new ResponseDecoder(), "result", response.result); |
2901 } | 2941 } |
2902 | 2942 |
2903 Map<String, dynamic> toJson() { | 2943 Map<String, dynamic> toJson() { |
2904 Map<String, dynamic> result = {}; | 2944 Map<String, dynamic> result = {}; |
2905 result["kinds"] = kinds.map((RefactoringKind value) => value.toJson()).toLis
t(); | 2945 result["kinds"] = kinds.map((RefactoringKind value) => value.toJson()).toLis
t(); |
2906 return result; | 2946 return result; |
2907 } | 2947 } |
2908 | 2948 |
| 2949 Response toResponse(String id) { |
| 2950 return new Response(id, result: toJson()); |
| 2951 } |
| 2952 |
2909 @override | 2953 @override |
2910 String toString() => JSON.encode(toJson()); | 2954 String toString() => JSON.encode(toJson()); |
2911 | 2955 |
2912 @override | 2956 @override |
2913 bool operator==(other) { | 2957 bool operator==(other) { |
2914 if (other is EditGetAvailableRefactoringsResult) { | 2958 if (other is EditGetAvailableRefactoringsResult) { |
2915 return _listEqual(kinds, other.kinds, (RefactoringKind a, RefactoringKind
b) => a == b); | 2959 return _listEqual(kinds, other.kinds, (RefactoringKind a, RefactoringKind
b) => a == b); |
2916 } | 2960 } |
2917 return false; | 2961 return false; |
2918 } | 2962 } |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3047 return new EditGetFixesResult.fromJson( | 3091 return new EditGetFixesResult.fromJson( |
3048 new ResponseDecoder(), "result", response.result); | 3092 new ResponseDecoder(), "result", response.result); |
3049 } | 3093 } |
3050 | 3094 |
3051 Map<String, dynamic> toJson() { | 3095 Map<String, dynamic> toJson() { |
3052 Map<String, dynamic> result = {}; | 3096 Map<String, dynamic> result = {}; |
3053 result["fixes"] = fixes.map((ErrorFixes value) => value.toJson()).toList(); | 3097 result["fixes"] = fixes.map((ErrorFixes value) => value.toJson()).toList(); |
3054 return result; | 3098 return result; |
3055 } | 3099 } |
3056 | 3100 |
| 3101 Response toResponse(String id) { |
| 3102 return new Response(id, result: toJson()); |
| 3103 } |
| 3104 |
3057 @override | 3105 @override |
3058 String toString() => JSON.encode(toJson()); | 3106 String toString() => JSON.encode(toJson()); |
3059 | 3107 |
3060 @override | 3108 @override |
3061 bool operator==(other) { | 3109 bool operator==(other) { |
3062 if (other is EditGetFixesResult) { | 3110 if (other is EditGetFixesResult) { |
3063 return _listEqual(fixes, other.fixes, (ErrorFixes a, ErrorFixes b) => a ==
b); | 3111 return _listEqual(fixes, other.fixes, (ErrorFixes a, ErrorFixes b) => a ==
b); |
3064 } | 3112 } |
3065 return false; | 3113 return false; |
3066 } | 3114 } |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3306 } | 3354 } |
3307 if (change != null) { | 3355 if (change != null) { |
3308 result["change"] = change.toJson(); | 3356 result["change"] = change.toJson(); |
3309 } | 3357 } |
3310 if (potentialEdits != null) { | 3358 if (potentialEdits != null) { |
3311 result["potentialEdits"] = potentialEdits; | 3359 result["potentialEdits"] = potentialEdits; |
3312 } | 3360 } |
3313 return result; | 3361 return result; |
3314 } | 3362 } |
3315 | 3363 |
| 3364 Response toResponse(String id) { |
| 3365 return new Response(id, result: toJson()); |
| 3366 } |
| 3367 |
3316 @override | 3368 @override |
3317 String toString() => JSON.encode(toJson()); | 3369 String toString() => JSON.encode(toJson()); |
3318 | 3370 |
3319 @override | 3371 @override |
3320 bool operator==(other) { | 3372 bool operator==(other) { |
3321 if (other is EditGetRefactoringResult) { | 3373 if (other is EditGetRefactoringResult) { |
3322 return _listEqual(status, other.status, (RefactoringProblem a, Refactoring
Problem b) => a == b) && | 3374 return _listEqual(status, other.status, (RefactoringProblem a, Refactoring
Problem b) => a == b) && |
3323 feedback == other.feedback && | 3375 feedback == other.feedback && |
3324 change == other.change && | 3376 change == other.change && |
3325 _listEqual(potentialEdits, other.potentialEdits, (String a, String b)
=> a == b); | 3377 _listEqual(potentialEdits, other.potentialEdits, (String a, String b)
=> a == b); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3440 return new DebugCreateContextResult.fromJson( | 3492 return new DebugCreateContextResult.fromJson( |
3441 new ResponseDecoder(), "result", response.result); | 3493 new ResponseDecoder(), "result", response.result); |
3442 } | 3494 } |
3443 | 3495 |
3444 Map<String, dynamic> toJson() { | 3496 Map<String, dynamic> toJson() { |
3445 Map<String, dynamic> result = {}; | 3497 Map<String, dynamic> result = {}; |
3446 result["id"] = id; | 3498 result["id"] = id; |
3447 return result; | 3499 return result; |
3448 } | 3500 } |
3449 | 3501 |
| 3502 Response toResponse(String id) { |
| 3503 return new Response(id, result: toJson()); |
| 3504 } |
| 3505 |
3450 @override | 3506 @override |
3451 String toString() => JSON.encode(toJson()); | 3507 String toString() => JSON.encode(toJson()); |
3452 | 3508 |
3453 @override | 3509 @override |
3454 bool operator==(other) { | 3510 bool operator==(other) { |
3455 if (other is DebugCreateContextResult) { | 3511 if (other is DebugCreateContextResult) { |
3456 return id == other.id; | 3512 return id == other.id; |
3457 } | 3513 } |
3458 return false; | 3514 return false; |
3459 } | 3515 } |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3679 Map<String, dynamic> result = {}; | 3735 Map<String, dynamic> result = {}; |
3680 if (file != null) { | 3736 if (file != null) { |
3681 result["file"] = file; | 3737 result["file"] = file; |
3682 } | 3738 } |
3683 if (uri != null) { | 3739 if (uri != null) { |
3684 result["uri"] = uri; | 3740 result["uri"] = uri; |
3685 } | 3741 } |
3686 return result; | 3742 return result; |
3687 } | 3743 } |
3688 | 3744 |
| 3745 Response toResponse(String id) { |
| 3746 return new Response(id, result: toJson()); |
| 3747 } |
| 3748 |
3689 @override | 3749 @override |
3690 String toString() => JSON.encode(toJson()); | 3750 String toString() => JSON.encode(toJson()); |
3691 | 3751 |
3692 @override | 3752 @override |
3693 bool operator==(other) { | 3753 bool operator==(other) { |
3694 if (other is DebugMapUriResult) { | 3754 if (other is DebugMapUriResult) { |
3695 return file == other.file && | 3755 return file == other.file && |
3696 uri == other.uri; | 3756 uri == other.uri; |
3697 } | 3757 } |
3698 return false; | 3758 return false; |
(...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5025 String returnType; | 5085 String returnType; |
5026 if (json.containsKey("returnType")) { | 5086 if (json.containsKey("returnType")) { |
5027 returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["r
eturnType"]); | 5087 returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["r
eturnType"]); |
5028 } | 5088 } |
5029 return new Element(kind, name, flags, location: location, parameters: para
meters, returnType: returnType); | 5089 return new Element(kind, name, flags, location: location, parameters: para
meters, returnType: returnType); |
5030 } else { | 5090 } else { |
5031 throw jsonDecoder.mismatch(jsonPath, "Element"); | 5091 throw jsonDecoder.mismatch(jsonPath, "Element"); |
5032 } | 5092 } |
5033 } | 5093 } |
5034 | 5094 |
| 5095 /** |
| 5096 * Construct based on a value from the analyzer engine. |
| 5097 */ |
| 5098 factory Element.fromEngine(engine.Element element) => |
| 5099 elementFromEngine(element); |
| 5100 |
5035 bool get isAbstract => (flags & FLAG_ABSTRACT) != 0; | 5101 bool get isAbstract => (flags & FLAG_ABSTRACT) != 0; |
5036 bool get isConst => (flags & FLAG_CONST) != 0; | 5102 bool get isConst => (flags & FLAG_CONST) != 0; |
5037 bool get isFinal => (flags & FLAG_FINAL) != 0; | 5103 bool get isFinal => (flags & FLAG_FINAL) != 0; |
5038 bool get isStatic => (flags & FLAG_STATIC) != 0; | 5104 bool get isStatic => (flags & FLAG_STATIC) != 0; |
5039 bool get isPrivate => (flags & FLAG_PRIVATE) != 0; | 5105 bool get isPrivate => (flags & FLAG_PRIVATE) != 0; |
5040 bool get isDeprecated => (flags & FLAG_DEPRECATED) != 0; | 5106 bool get isDeprecated => (flags & FLAG_DEPRECATED) != 0; |
5041 | 5107 |
5042 Map<String, dynamic> toJson() { | 5108 Map<String, dynamic> toJson() { |
5043 Map<String, dynamic> result = {}; | 5109 Map<String, dynamic> result = {}; |
5044 result["kind"] = kind.toJson(); | 5110 result["kind"] = kind.toJson(); |
(...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6548 startColumn = jsonDecoder._decodeInt(jsonPath + ".startColumn", json["st
artColumn"]); | 6614 startColumn = jsonDecoder._decodeInt(jsonPath + ".startColumn", json["st
artColumn"]); |
6549 } else { | 6615 } else { |
6550 throw jsonDecoder.missingKey(jsonPath, "startColumn"); | 6616 throw jsonDecoder.missingKey(jsonPath, "startColumn"); |
6551 } | 6617 } |
6552 return new Location(file, offset, length, startLine, startColumn); | 6618 return new Location(file, offset, length, startLine, startColumn); |
6553 } else { | 6619 } else { |
6554 throw jsonDecoder.mismatch(jsonPath, "Location"); | 6620 throw jsonDecoder.mismatch(jsonPath, "Location"); |
6555 } | 6621 } |
6556 } | 6622 } |
6557 | 6623 |
| 6624 /** |
| 6625 * Construct based on an element from the analyzer engine. |
| 6626 */ |
| 6627 factory Location.fromElement(engine.Element element) => |
| 6628 _locationFromElement(element); |
| 6629 |
| 6630 /** |
| 6631 * Create a Location based on an element and offset from the analyzer engine. |
| 6632 */ |
| 6633 factory Location.fromOffset(engine.Element element, int offset, int length) => |
| 6634 _locationFromOffset(element, offset, length); |
| 6635 |
6558 Map<String, dynamic> toJson() { | 6636 Map<String, dynamic> toJson() { |
6559 Map<String, dynamic> result = {}; | 6637 Map<String, dynamic> result = {}; |
6560 result["file"] = file; | 6638 result["file"] = file; |
6561 result["offset"] = offset; | 6639 result["offset"] = offset; |
6562 result["length"] = length; | 6640 result["length"] = length; |
6563 result["startLine"] = startLine; | 6641 result["startLine"] = startLine; |
6564 result["startColumn"] = startColumn; | 6642 result["startColumn"] = startColumn; |
6565 return result; | 6643 return result; |
6566 } | 6644 } |
6567 | 6645 |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7016 className = jsonDecoder._decodeString(jsonPath + ".className", json["cla
ssName"]); | 7094 className = jsonDecoder._decodeString(jsonPath + ".className", json["cla
ssName"]); |
7017 } else { | 7095 } else { |
7018 throw jsonDecoder.missingKey(jsonPath, "className"); | 7096 throw jsonDecoder.missingKey(jsonPath, "className"); |
7019 } | 7097 } |
7020 return new OverriddenMember(element, className); | 7098 return new OverriddenMember(element, className); |
7021 } else { | 7099 } else { |
7022 throw jsonDecoder.mismatch(jsonPath, "OverriddenMember"); | 7100 throw jsonDecoder.mismatch(jsonPath, "OverriddenMember"); |
7023 } | 7101 } |
7024 } | 7102 } |
7025 | 7103 |
| 7104 /** |
| 7105 * Construct based on an element from the analyzer engine. |
| 7106 */ |
| 7107 factory OverriddenMember.fromEngine(engine.Element member) => |
| 7108 _overriddenMemberFromEngine(member); |
| 7109 |
7026 Map<String, dynamic> toJson() { | 7110 Map<String, dynamic> toJson() { |
7027 Map<String, dynamic> result = {}; | 7111 Map<String, dynamic> result = {}; |
7028 result["element"] = element.toJson(); | 7112 result["element"] = element.toJson(); |
7029 result["className"] = className; | 7113 result["className"] = className; |
7030 return result; | 7114 return result; |
7031 } | 7115 } |
7032 | 7116 |
7033 @override | 7117 @override |
7034 String toString() => JSON.encode(toJson()); | 7118 String toString() => JSON.encode(toJson()); |
7035 | 7119 |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7618 path = jsonDecoder._decodeList(jsonPath + ".path", json["path"], (String
jsonPath, Object json) => new Element.fromJson(jsonDecoder, jsonPath, json)); | 7702 path = jsonDecoder._decodeList(jsonPath + ".path", json["path"], (String
jsonPath, Object json) => new Element.fromJson(jsonDecoder, jsonPath, json)); |
7619 } else { | 7703 } else { |
7620 throw jsonDecoder.missingKey(jsonPath, "path"); | 7704 throw jsonDecoder.missingKey(jsonPath, "path"); |
7621 } | 7705 } |
7622 return new SearchResult(location, kind, isPotential, path); | 7706 return new SearchResult(location, kind, isPotential, path); |
7623 } else { | 7707 } else { |
7624 throw jsonDecoder.mismatch(jsonPath, "SearchResult"); | 7708 throw jsonDecoder.mismatch(jsonPath, "SearchResult"); |
7625 } | 7709 } |
7626 } | 7710 } |
7627 | 7711 |
| 7712 /** |
| 7713 * Construct based on a value from the search engine. |
| 7714 */ |
| 7715 factory SearchResult.fromMatch(engine.SearchMatch match) => |
| 7716 searchResultFromMatch(match); |
| 7717 |
7628 Map<String, dynamic> toJson() { | 7718 Map<String, dynamic> toJson() { |
7629 Map<String, dynamic> result = {}; | 7719 Map<String, dynamic> result = {}; |
7630 result["location"] = location.toJson(); | 7720 result["location"] = location.toJson(); |
7631 result["kind"] = kind.toJson(); | 7721 result["kind"] = kind.toJson(); |
7632 result["isPotential"] = isPotential; | 7722 result["isPotential"] = isPotential; |
7633 result["path"] = path.map((Element value) => value.toJson()).toList(); | 7723 result["path"] = path.map((Element value) => value.toJson()).toList(); |
7634 return result; | 7724 return result; |
7635 } | 7725 } |
7636 | 7726 |
7637 @override | 7727 @override |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7737 if (json is String) { | 7827 if (json is String) { |
7738 try { | 7828 try { |
7739 return new SearchResultKind(json); | 7829 return new SearchResultKind(json); |
7740 } catch(_) { | 7830 } catch(_) { |
7741 // Fall through | 7831 // Fall through |
7742 } | 7832 } |
7743 } | 7833 } |
7744 throw jsonDecoder.mismatch(jsonPath, "SearchResultKind"); | 7834 throw jsonDecoder.mismatch(jsonPath, "SearchResultKind"); |
7745 } | 7835 } |
7746 | 7836 |
| 7837 /** |
| 7838 * Construct based on a value from the search engine. |
| 7839 */ |
| 7840 factory SearchResultKind.fromEngine(engine.MatchKind kind) => |
| 7841 _searchResultKindFromEngine(kind); |
| 7842 |
7747 @override | 7843 @override |
7748 String toString() => "SearchResultKind.$name"; | 7844 String toString() => "SearchResultKind.$name"; |
7749 | 7845 |
7750 String toJson() => name; | 7846 String toJson() => name; |
7751 } | 7847 } |
7752 | 7848 |
7753 /** | 7849 /** |
7754 * ServerService | 7850 * ServerService |
7755 * | 7851 * |
7756 * enum { | 7852 * enum { |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8068 } | 8164 } |
8069 } | 8165 } |
8070 | 8166 |
8071 Map<String, dynamic> toJson() { | 8167 Map<String, dynamic> toJson() { |
8072 Map<String, dynamic> result = {}; | 8168 Map<String, dynamic> result = {}; |
8073 result["file"] = file; | 8169 result["file"] = file; |
8074 result["edits"] = edits.map((SourceEdit value) => value.toJson()).toList(); | 8170 result["edits"] = edits.map((SourceEdit value) => value.toJson()).toList(); |
8075 return result; | 8171 return result; |
8076 } | 8172 } |
8077 | 8173 |
| 8174 /** |
| 8175 * Adds the given [Edit] to the list. |
| 8176 */ |
| 8177 void add(SourceEdit edit) => _addEditForSource(this, edit); |
| 8178 |
| 8179 /** |
| 8180 * Adds the given [Edit]s. |
| 8181 */ |
| 8182 void addAll(Iterable<SourceEdit> edits) => |
| 8183 _addAllEditsForSource(this, edits); |
| 8184 |
8078 @override | 8185 @override |
8079 String toString() => JSON.encode(toJson()); | 8186 String toString() => JSON.encode(toJson()); |
8080 | 8187 |
8081 @override | 8188 @override |
8082 bool operator==(other) { | 8189 bool operator==(other) { |
8083 if (other is SourceFileEdit) { | 8190 if (other is SourceFileEdit) { |
8084 return file == other.file && | 8191 return file == other.file && |
8085 _listEqual(edits, other.edits, (SourceEdit a, SourceEdit b) => a == b)
; | 8192 _listEqual(edits, other.edits, (SourceEdit a, SourceEdit b) => a == b)
; |
8086 } | 8193 } |
8087 return false; | 8194 return false; |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8962 return false; | 9069 return false; |
8963 } | 9070 } |
8964 | 9071 |
8965 @override | 9072 @override |
8966 int get hashCode { | 9073 int get hashCode { |
8967 int hash = 0; | 9074 int hash = 0; |
8968 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); | 9075 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); |
8969 return _JenkinsSmiHash.finish(hash); | 9076 return _JenkinsSmiHash.finish(hash); |
8970 } | 9077 } |
8971 } | 9078 } |
OLD | NEW |