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

Side by Side Diff: pkg/analysis_server/lib/src/generated_protocol.dart

Issue 1372623004: New analysis.implemented notification specification. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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) 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/tool/spec/generate_files". 7 // "pkg/analysis_server/tool/spec/generate_files".
8 8
9 part of protocol; 9 part of protocol;
10 /** 10 /**
(...skipping 2570 matching lines...) Expand 10 before | Expand all | Expand 10 after
2581 @override 2581 @override
2582 int get hashCode { 2582 int get hashCode {
2583 int hash = 0; 2583 int hash = 0;
2584 hash = _JenkinsSmiHash.combine(hash, file.hashCode); 2584 hash = _JenkinsSmiHash.combine(hash, file.hashCode);
2585 hash = _JenkinsSmiHash.combine(hash, regions.hashCode); 2585 hash = _JenkinsSmiHash.combine(hash, regions.hashCode);
2586 return _JenkinsSmiHash.finish(hash); 2586 return _JenkinsSmiHash.finish(hash);
2587 } 2587 }
2588 } 2588 }
2589 2589
2590 /** 2590 /**
2591 * analysis.implemented params
2592 *
2593 * {
2594 * "file": FilePath
2595 * "implementedElements": List<ImplementedElement>
2596 * }
2597 */
2598 class AnalysisImplementedParams implements HasToJson {
2599 String _file;
2600
2601 List<ImplementedElement> _implementedElements;
2602
2603 /**
2604 * The file with which the implementations are associated.
2605 */
2606 String get file => _file;
2607
2608 /**
2609 * The file with which the implementations are associated.
2610 */
2611 void set file(String value) {
2612 assert(value != null);
2613 this._file = value;
2614 }
2615
2616 /**
2617 * The classes or class members defined in the file that have implementations
2618 * or overrides.
2619 */
2620 List<ImplementedElement> get implementedElements => _implementedElements;
2621
2622 /**
2623 * The classes or class members defined in the file that have implementations
2624 * or overrides.
2625 */
2626 void set implementedElements(List<ImplementedElement> value) {
2627 assert(value != null);
2628 this._implementedElements = value;
2629 }
2630
2631 AnalysisImplementedParams(String file, List<ImplementedElement> implementedEle ments) {
2632 this.file = file;
2633 this.implementedElements = implementedElements;
2634 }
2635
2636 factory AnalysisImplementedParams.fromJson(JsonDecoder jsonDecoder, String jso nPath, Object json) {
2637 if (json == null) {
2638 json = {};
2639 }
2640 if (json is Map) {
2641 String file;
2642 if (json.containsKey("file")) {
2643 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
2644 } else {
2645 throw jsonDecoder.missingKey(jsonPath, "file");
2646 }
2647 List<ImplementedElement> implementedElements;
2648 if (json.containsKey("implementedElements")) {
2649 implementedElements = jsonDecoder._decodeList(jsonPath + ".implementedEl ements", json["implementedElements"], (String jsonPath, Object json) => new Impl ementedElement.fromJson(jsonDecoder, jsonPath, json));
2650 } else {
2651 throw jsonDecoder.missingKey(jsonPath, "implementedElements");
2652 }
2653 return new AnalysisImplementedParams(file, implementedElements);
2654 } else {
2655 throw jsonDecoder.mismatch(jsonPath, "analysis.implemented params", json);
2656 }
2657 }
2658
2659 factory AnalysisImplementedParams.fromNotification(Notification notification) {
2660 return new AnalysisImplementedParams.fromJson(
2661 new ResponseDecoder(null), "params", notification._params);
2662 }
2663
2664 Map<String, dynamic> toJson() {
2665 Map<String, dynamic> result = {};
2666 result["file"] = file;
2667 result["implementedElements"] = implementedElements.map((ImplementedElement value) => value.toJson()).toList();
2668 return result;
2669 }
2670
2671 Notification toNotification() {
2672 return new Notification("analysis.implemented", toJson());
2673 }
2674
2675 @override
2676 String toString() => JSON.encode(toJson());
2677
2678 @override
2679 bool operator==(other) {
2680 if (other is AnalysisImplementedParams) {
2681 return file == other.file &&
2682 _listEqual(implementedElements, other.implementedElements, (Implemente dElement a, ImplementedElement b) => a == b);
2683 }
2684 return false;
2685 }
2686
2687 @override
2688 int get hashCode {
2689 int hash = 0;
2690 hash = _JenkinsSmiHash.combine(hash, file.hashCode);
2691 hash = _JenkinsSmiHash.combine(hash, implementedElements.hashCode);
2692 return _JenkinsSmiHash.finish(hash);
2693 }
2694 }
2695
2696 /**
2591 * analysis.invalidate params 2697 * analysis.invalidate params
2592 * 2698 *
2593 * { 2699 * {
2594 * "file": FilePath 2700 * "file": FilePath
2595 * "offset": int 2701 * "offset": int
2596 * "length": int 2702 * "length": int
2597 * "delta": int 2703 * "delta": int
2598 * } 2704 * }
2599 */ 2705 */
2600 class AnalysisInvalidateParams implements HasToJson { 2706 class AnalysisInvalidateParams implements HasToJson {
(...skipping 5228 matching lines...) Expand 10 before | Expand all | Expand 10 after
7829 return _JenkinsSmiHash.finish(hash); 7935 return _JenkinsSmiHash.finish(hash);
7830 } 7936 }
7831 } 7937 }
7832 7938
7833 /** 7939 /**
7834 * AnalysisService 7940 * AnalysisService
7835 * 7941 *
7836 * enum { 7942 * enum {
7837 * FOLDING 7943 * FOLDING
7838 * HIGHLIGHTS 7944 * HIGHLIGHTS
7945 * IMPLEMENTED
7839 * INVALIDATE 7946 * INVALIDATE
7840 * NAVIGATION 7947 * NAVIGATION
7841 * OCCURRENCES 7948 * OCCURRENCES
7842 * OUTLINE 7949 * OUTLINE
7843 * OVERRIDES 7950 * OVERRIDES
7844 * } 7951 * }
7845 */ 7952 */
7846 class AnalysisService implements Enum { 7953 class AnalysisService implements Enum {
7847 static const FOLDING = const AnalysisService._("FOLDING"); 7954 static const FOLDING = const AnalysisService._("FOLDING");
7848 7955
7849 static const HIGHLIGHTS = const AnalysisService._("HIGHLIGHTS"); 7956 static const HIGHLIGHTS = const AnalysisService._("HIGHLIGHTS");
7850 7957
7958 static const IMPLEMENTED = const AnalysisService._("IMPLEMENTED");
7959
7851 /** 7960 /**
7852 * This service is not currently implemented and will become a 7961 * This service is not currently implemented and will become a
7853 * GeneralAnalysisService in a future release. 7962 * GeneralAnalysisService in a future release.
7854 */ 7963 */
7855 static const INVALIDATE = const AnalysisService._("INVALIDATE"); 7964 static const INVALIDATE = const AnalysisService._("INVALIDATE");
7856 7965
7857 static const NAVIGATION = const AnalysisService._("NAVIGATION"); 7966 static const NAVIGATION = const AnalysisService._("NAVIGATION");
7858 7967
7859 static const OCCURRENCES = const AnalysisService._("OCCURRENCES"); 7968 static const OCCURRENCES = const AnalysisService._("OCCURRENCES");
7860 7969
7861 static const OUTLINE = const AnalysisService._("OUTLINE"); 7970 static const OUTLINE = const AnalysisService._("OUTLINE");
7862 7971
7863 static const OVERRIDES = const AnalysisService._("OVERRIDES"); 7972 static const OVERRIDES = const AnalysisService._("OVERRIDES");
7864 7973
7865 /** 7974 /**
7866 * A list containing all of the enum values that are defined. 7975 * A list containing all of the enum values that are defined.
7867 */ 7976 */
7868 static const List<AnalysisService> VALUES = const <AnalysisService>[FOLDING, H IGHLIGHTS, INVALIDATE, NAVIGATION, OCCURRENCES, OUTLINE, OVERRIDES]; 7977 static const List<AnalysisService> VALUES = const <AnalysisService>[FOLDING, H IGHLIGHTS, IMPLEMENTED, INVALIDATE, NAVIGATION, OCCURRENCES, OUTLINE, OVERRIDES] ;
7869 7978
7870 final String name; 7979 final String name;
7871 7980
7872 const AnalysisService._(this.name); 7981 const AnalysisService._(this.name);
7873 7982
7874 factory AnalysisService(String name) { 7983 factory AnalysisService(String name) {
7875 switch (name) { 7984 switch (name) {
7876 case "FOLDING": 7985 case "FOLDING":
7877 return FOLDING; 7986 return FOLDING;
7878 case "HIGHLIGHTS": 7987 case "HIGHLIGHTS":
7879 return HIGHLIGHTS; 7988 return HIGHLIGHTS;
7989 case "IMPLEMENTED":
7990 return IMPLEMENTED;
7880 case "INVALIDATE": 7991 case "INVALIDATE":
7881 return INVALIDATE; 7992 return INVALIDATE;
7882 case "NAVIGATION": 7993 case "NAVIGATION":
7883 return NAVIGATION; 7994 return NAVIGATION;
7884 case "OCCURRENCES": 7995 case "OCCURRENCES":
7885 return OCCURRENCES; 7996 return OCCURRENCES;
7886 case "OUTLINE": 7997 case "OUTLINE":
7887 return OUTLINE; 7998 return OUTLINE;
7888 case "OVERRIDES": 7999 case "OVERRIDES":
7889 return OVERRIDES; 8000 return OVERRIDES;
(...skipping 2738 matching lines...) Expand 10 before | Expand all | Expand 10 after
10628 hash = _JenkinsSmiHash.combine(hash, elementDescription.hashCode); 10739 hash = _JenkinsSmiHash.combine(hash, elementDescription.hashCode);
10629 hash = _JenkinsSmiHash.combine(hash, elementKind.hashCode); 10740 hash = _JenkinsSmiHash.combine(hash, elementKind.hashCode);
10630 hash = _JenkinsSmiHash.combine(hash, parameter.hashCode); 10741 hash = _JenkinsSmiHash.combine(hash, parameter.hashCode);
10631 hash = _JenkinsSmiHash.combine(hash, propagatedType.hashCode); 10742 hash = _JenkinsSmiHash.combine(hash, propagatedType.hashCode);
10632 hash = _JenkinsSmiHash.combine(hash, staticType.hashCode); 10743 hash = _JenkinsSmiHash.combine(hash, staticType.hashCode);
10633 return _JenkinsSmiHash.finish(hash); 10744 return _JenkinsSmiHash.finish(hash);
10634 } 10745 }
10635 } 10746 }
10636 10747
10637 /** 10748 /**
10749 * ImplementedElement
10750 *
10751 * {
10752 * "offset": int
10753 * "length": int
10754 * "implementations": optional List<Implementation>
10755 * }
10756 */
10757 class ImplementedElement implements HasToJson {
10758 int _offset;
10759
10760 int _length;
10761
10762 List<Implementation> _implementations;
10763
10764 /**
10765 * The offset of the name of the implemented element.
10766 */
10767 int get offset => _offset;
10768
10769 /**
10770 * The offset of the name of the implemented element.
10771 */
10772 void set offset(int value) {
10773 assert(value != null);
10774 this._offset = value;
10775 }
10776
10777 /**
10778 * The length of the name of the implemented element.
10779 */
10780 int get length => _length;
10781
10782 /**
10783 * The length of the name of the implemented element.
10784 */
10785 void set length(int value) {
10786 assert(value != null);
10787 this._length = value;
10788 }
10789
10790 /**
10791 * The classes or class members that implement this element.
10792 */
10793 List<Implementation> get implementations => _implementations;
10794
10795 /**
10796 * The classes or class members that implement this element.
10797 */
10798 void set implementations(List<Implementation> value) {
10799 this._implementations = value;
10800 }
10801
10802 ImplementedElement(int offset, int length, {List<Implementation> implementatio ns}) {
10803 this.offset = offset;
10804 this.length = length;
10805 this.implementations = implementations;
10806 }
10807
10808 factory ImplementedElement.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
10809 if (json == null) {
10810 json = {};
10811 }
10812 if (json is Map) {
10813 int offset;
10814 if (json.containsKey("offset")) {
10815 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
10816 } else {
10817 throw jsonDecoder.missingKey(jsonPath, "offset");
10818 }
10819 int length;
10820 if (json.containsKey("length")) {
10821 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
10822 } else {
10823 throw jsonDecoder.missingKey(jsonPath, "length");
10824 }
10825 List<Implementation> implementations;
10826 if (json.containsKey("implementations")) {
10827 implementations = jsonDecoder._decodeList(jsonPath + ".implementations", json["implementations"], (String jsonPath, Object json) => new Implementation.f romJson(jsonDecoder, jsonPath, json));
10828 }
10829 return new ImplementedElement(offset, length, implementations: implementat ions);
10830 } else {
10831 throw jsonDecoder.mismatch(jsonPath, "ImplementedElement", json);
10832 }
10833 }
10834
10835 Map<String, dynamic> toJson() {
10836 Map<String, dynamic> result = {};
10837 result["offset"] = offset;
10838 result["length"] = length;
10839 if (implementations != null) {
10840 result["implementations"] = implementations.map((Implementation value) => value.toJson()).toList();
10841 }
10842 return result;
10843 }
10844
10845 @override
10846 String toString() => JSON.encode(toJson());
10847
10848 @override
10849 bool operator==(other) {
10850 if (other is ImplementedElement) {
10851 return offset == other.offset &&
10852 length == other.length &&
10853 _listEqual(implementations, other.implementations, (Implementation a, Implementation b) => a == b);
10854 }
10855 return false;
10856 }
10857
10858 @override
10859 int get hashCode {
10860 int hash = 0;
10861 hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
10862 hash = _JenkinsSmiHash.combine(hash, length.hashCode);
10863 hash = _JenkinsSmiHash.combine(hash, implementations.hashCode);
10864 return _JenkinsSmiHash.finish(hash);
10865 }
10866 }
10867
10868 /**
10869 * Implementation
10870 *
10871 * {
10872 * "element": Element
10873 * "className": optional String
10874 * }
10875 */
10876 class Implementation implements HasToJson {
10877 Element _element;
10878
10879 String _className;
10880
10881 /**
10882 * The element that implements a class or class member.
10883 */
10884 Element get element => _element;
10885
10886 /**
10887 * The element that implements a class or class member.
10888 */
10889 void set element(Element value) {
10890 assert(value != null);
10891 this._element = value;
10892 }
10893
10894 /**
10895 * The name of the class in which the class member is implemented. This field
10896 * is omitted if the element itself is a class.
10897 */
10898 String get className => _className;
10899
10900 /**
10901 * The name of the class in which the class member is implemented. This field
10902 * is omitted if the element itself is a class.
10903 */
10904 void set className(String value) {
10905 this._className = value;
10906 }
10907
10908 Implementation(Element element, {String className}) {
10909 this.element = element;
10910 this.className = className;
10911 }
10912
10913 factory Implementation.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje ct json) {
10914 if (json == null) {
10915 json = {};
10916 }
10917 if (json is Map) {
10918 Element element;
10919 if (json.containsKey("element")) {
10920 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[ "element"]);
10921 } else {
10922 throw jsonDecoder.missingKey(jsonPath, "element");
10923 }
10924 String className;
10925 if (json.containsKey("className")) {
10926 className = jsonDecoder._decodeString(jsonPath + ".className", json["cla ssName"]);
10927 }
10928 return new Implementation(element, className: className);
10929 } else {
10930 throw jsonDecoder.mismatch(jsonPath, "Implementation", json);
10931 }
10932 }
10933
10934 Map<String, dynamic> toJson() {
10935 Map<String, dynamic> result = {};
10936 result["element"] = element.toJson();
10937 if (className != null) {
10938 result["className"] = className;
10939 }
10940 return result;
10941 }
10942
10943 @override
10944 String toString() => JSON.encode(toJson());
10945
10946 @override
10947 bool operator==(other) {
10948 if (other is Implementation) {
10949 return element == other.element &&
10950 className == other.className;
10951 }
10952 return false;
10953 }
10954
10955 @override
10956 int get hashCode {
10957 int hash = 0;
10958 hash = _JenkinsSmiHash.combine(hash, element.hashCode);
10959 hash = _JenkinsSmiHash.combine(hash, className.hashCode);
10960 return _JenkinsSmiHash.finish(hash);
10961 }
10962 }
10963
10964 /**
10638 * LinkedEditGroup 10965 * LinkedEditGroup
10639 * 10966 *
10640 * { 10967 * {
10641 * "positions": List<Position> 10968 * "positions": List<Position>
10642 * "length": int 10969 * "length": int
10643 * "suggestions": List<LinkedEditSuggestion> 10970 * "suggestions": List<LinkedEditSuggestion>
10644 * } 10971 * }
10645 */ 10972 */
10646 class LinkedEditGroup implements HasToJson { 10973 class LinkedEditGroup implements HasToJson {
10647 List<Position> _positions; 10974 List<Position> _positions;
(...skipping 4944 matching lines...) Expand 10 before | Expand all | Expand 10 after
15592 return false; 15919 return false;
15593 } 15920 }
15594 15921
15595 @override 15922 @override
15596 int get hashCode { 15923 int get hashCode {
15597 int hash = 0; 15924 int hash = 0;
15598 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 15925 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
15599 return _JenkinsSmiHash.finish(hash); 15926 return _JenkinsSmiHash.finish(hash);
15600 } 15927 }
15601 } 15928 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698