Index: pkg/analysis_server/lib/src/generated_protocol.dart |
diff --git a/pkg/analysis_server/lib/src/generated_protocol.dart b/pkg/analysis_server/lib/src/generated_protocol.dart |
index 672e029035dd652398b6b64b43b763485f080c02..ebc603ba398d521a38a2ed39edbed2e546078dd7 100644 |
--- a/pkg/analysis_server/lib/src/generated_protocol.dart |
+++ b/pkg/analysis_server/lib/src/generated_protocol.dart |
@@ -2588,6 +2588,112 @@ class AnalysisHighlightsParams implements HasToJson { |
} |
/** |
+ * analysis.implemented params |
+ * |
+ * { |
+ * "file": FilePath |
+ * "implementedElements": List<ImplementedElement> |
+ * } |
+ */ |
+class AnalysisImplementedParams implements HasToJson { |
+ String _file; |
+ |
+ List<ImplementedElement> _implementedElements; |
+ |
+ /** |
+ * The file with which the implementations are associated. |
+ */ |
+ String get file => _file; |
+ |
+ /** |
+ * The file with which the implementations are associated. |
+ */ |
+ void set file(String value) { |
+ assert(value != null); |
+ this._file = value; |
+ } |
+ |
+ /** |
+ * The classes or class members defined in the file that have implementations |
+ * or overrides. |
+ */ |
+ List<ImplementedElement> get implementedElements => _implementedElements; |
+ |
+ /** |
+ * The classes or class members defined in the file that have implementations |
+ * or overrides. |
+ */ |
+ void set implementedElements(List<ImplementedElement> value) { |
+ assert(value != null); |
+ this._implementedElements = value; |
+ } |
+ |
+ AnalysisImplementedParams(String file, List<ImplementedElement> implementedElements) { |
+ this.file = file; |
+ this.implementedElements = implementedElements; |
+ } |
+ |
+ factory AnalysisImplementedParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { |
+ if (json == null) { |
+ json = {}; |
+ } |
+ if (json is Map) { |
+ String file; |
+ if (json.containsKey("file")) { |
+ file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
+ } else { |
+ throw jsonDecoder.missingKey(jsonPath, "file"); |
+ } |
+ List<ImplementedElement> implementedElements; |
+ if (json.containsKey("implementedElements")) { |
+ implementedElements = jsonDecoder._decodeList(jsonPath + ".implementedElements", json["implementedElements"], (String jsonPath, Object json) => new ImplementedElement.fromJson(jsonDecoder, jsonPath, json)); |
+ } else { |
+ throw jsonDecoder.missingKey(jsonPath, "implementedElements"); |
+ } |
+ return new AnalysisImplementedParams(file, implementedElements); |
+ } else { |
+ throw jsonDecoder.mismatch(jsonPath, "analysis.implemented params", json); |
+ } |
+ } |
+ |
+ factory AnalysisImplementedParams.fromNotification(Notification notification) { |
+ return new AnalysisImplementedParams.fromJson( |
+ new ResponseDecoder(null), "params", notification._params); |
+ } |
+ |
+ Map<String, dynamic> toJson() { |
+ Map<String, dynamic> result = {}; |
+ result["file"] = file; |
+ result["implementedElements"] = implementedElements.map((ImplementedElement value) => value.toJson()).toList(); |
+ return result; |
+ } |
+ |
+ Notification toNotification() { |
+ return new Notification("analysis.implemented", toJson()); |
+ } |
+ |
+ @override |
+ String toString() => JSON.encode(toJson()); |
+ |
+ @override |
+ bool operator==(other) { |
+ if (other is AnalysisImplementedParams) { |
+ return file == other.file && |
+ _listEqual(implementedElements, other.implementedElements, (ImplementedElement a, ImplementedElement b) => a == b); |
+ } |
+ return false; |
+ } |
+ |
+ @override |
+ int get hashCode { |
+ int hash = 0; |
+ hash = _JenkinsSmiHash.combine(hash, file.hashCode); |
+ hash = _JenkinsSmiHash.combine(hash, implementedElements.hashCode); |
+ return _JenkinsSmiHash.finish(hash); |
+ } |
+} |
+ |
+/** |
* analysis.invalidate params |
* |
* { |
@@ -7836,6 +7942,7 @@ class AnalysisOptions implements HasToJson { |
* enum { |
* FOLDING |
* HIGHLIGHTS |
+ * IMPLEMENTED |
* INVALIDATE |
* NAVIGATION |
* OCCURRENCES |
@@ -7848,6 +7955,8 @@ class AnalysisService implements Enum { |
static const HIGHLIGHTS = const AnalysisService._("HIGHLIGHTS"); |
+ static const IMPLEMENTED = const AnalysisService._("IMPLEMENTED"); |
+ |
/** |
* This service is not currently implemented and will become a |
* GeneralAnalysisService in a future release. |
@@ -7865,7 +7974,7 @@ class AnalysisService implements Enum { |
/** |
* A list containing all of the enum values that are defined. |
*/ |
- static const List<AnalysisService> VALUES = const <AnalysisService>[FOLDING, HIGHLIGHTS, INVALIDATE, NAVIGATION, OCCURRENCES, OUTLINE, OVERRIDES]; |
+ static const List<AnalysisService> VALUES = const <AnalysisService>[FOLDING, HIGHLIGHTS, IMPLEMENTED, INVALIDATE, NAVIGATION, OCCURRENCES, OUTLINE, OVERRIDES]; |
final String name; |
@@ -7877,6 +7986,8 @@ class AnalysisService implements Enum { |
return FOLDING; |
case "HIGHLIGHTS": |
return HIGHLIGHTS; |
+ case "IMPLEMENTED": |
+ return IMPLEMENTED; |
case "INVALIDATE": |
return INVALIDATE; |
case "NAVIGATION": |
@@ -10635,6 +10746,222 @@ class HoverInformation implements HasToJson { |
} |
/** |
+ * ImplementedElement |
+ * |
+ * { |
+ * "offset": int |
+ * "length": int |
+ * "implementations": optional List<Implementation> |
+ * } |
+ */ |
+class ImplementedElement implements HasToJson { |
+ int _offset; |
+ |
+ int _length; |
+ |
+ List<Implementation> _implementations; |
+ |
+ /** |
+ * The offset of the name of the implemented element. |
+ */ |
+ int get offset => _offset; |
+ |
+ /** |
+ * The offset of the name of the implemented element. |
+ */ |
+ void set offset(int value) { |
+ assert(value != null); |
+ this._offset = value; |
+ } |
+ |
+ /** |
+ * The length of the name of the implemented element. |
+ */ |
+ int get length => _length; |
+ |
+ /** |
+ * The length of the name of the implemented element. |
+ */ |
+ void set length(int value) { |
+ assert(value != null); |
+ this._length = value; |
+ } |
+ |
+ /** |
+ * The classes or class members that implement this element. |
+ */ |
+ List<Implementation> get implementations => _implementations; |
+ |
+ /** |
+ * The classes or class members that implement this element. |
+ */ |
+ void set implementations(List<Implementation> value) { |
+ this._implementations = value; |
+ } |
+ |
+ ImplementedElement(int offset, int length, {List<Implementation> implementations}) { |
+ this.offset = offset; |
+ this.length = length; |
+ this.implementations = implementations; |
+ } |
+ |
+ factory ImplementedElement.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { |
+ if (json == null) { |
+ json = {}; |
+ } |
+ if (json is Map) { |
+ int offset; |
+ if (json.containsKey("offset")) { |
+ offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
+ } else { |
+ throw jsonDecoder.missingKey(jsonPath, "offset"); |
+ } |
+ int length; |
+ if (json.containsKey("length")) { |
+ length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); |
+ } else { |
+ throw jsonDecoder.missingKey(jsonPath, "length"); |
+ } |
+ List<Implementation> implementations; |
+ if (json.containsKey("implementations")) { |
+ implementations = jsonDecoder._decodeList(jsonPath + ".implementations", json["implementations"], (String jsonPath, Object json) => new Implementation.fromJson(jsonDecoder, jsonPath, json)); |
+ } |
+ return new ImplementedElement(offset, length, implementations: implementations); |
+ } else { |
+ throw jsonDecoder.mismatch(jsonPath, "ImplementedElement", json); |
+ } |
+ } |
+ |
+ Map<String, dynamic> toJson() { |
+ Map<String, dynamic> result = {}; |
+ result["offset"] = offset; |
+ result["length"] = length; |
+ if (implementations != null) { |
+ result["implementations"] = implementations.map((Implementation value) => value.toJson()).toList(); |
+ } |
+ return result; |
+ } |
+ |
+ @override |
+ String toString() => JSON.encode(toJson()); |
+ |
+ @override |
+ bool operator==(other) { |
+ if (other is ImplementedElement) { |
+ return offset == other.offset && |
+ length == other.length && |
+ _listEqual(implementations, other.implementations, (Implementation a, Implementation b) => a == b); |
+ } |
+ return false; |
+ } |
+ |
+ @override |
+ int get hashCode { |
+ int hash = 0; |
+ hash = _JenkinsSmiHash.combine(hash, offset.hashCode); |
+ hash = _JenkinsSmiHash.combine(hash, length.hashCode); |
+ hash = _JenkinsSmiHash.combine(hash, implementations.hashCode); |
+ return _JenkinsSmiHash.finish(hash); |
+ } |
+} |
+ |
+/** |
+ * Implementation |
+ * |
+ * { |
+ * "element": Element |
+ * "className": optional String |
+ * } |
+ */ |
+class Implementation implements HasToJson { |
+ Element _element; |
+ |
+ String _className; |
+ |
+ /** |
+ * The element that implements a class or class member. |
+ */ |
+ Element get element => _element; |
+ |
+ /** |
+ * The element that implements a class or class member. |
+ */ |
+ void set element(Element value) { |
+ assert(value != null); |
+ this._element = value; |
+ } |
+ |
+ /** |
+ * The name of the class in which the class member is implemented. This field |
+ * is omitted if the element itself is a class. |
+ */ |
+ String get className => _className; |
+ |
+ /** |
+ * The name of the class in which the class member is implemented. This field |
+ * is omitted if the element itself is a class. |
+ */ |
+ void set className(String value) { |
+ this._className = value; |
+ } |
+ |
+ Implementation(Element element, {String className}) { |
+ this.element = element; |
+ this.className = className; |
+ } |
+ |
+ factory Implementation.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { |
+ if (json == null) { |
+ json = {}; |
+ } |
+ if (json is Map) { |
+ Element element; |
+ if (json.containsKey("element")) { |
+ element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json["element"]); |
+ } else { |
+ throw jsonDecoder.missingKey(jsonPath, "element"); |
+ } |
+ String className; |
+ if (json.containsKey("className")) { |
+ className = jsonDecoder._decodeString(jsonPath + ".className", json["className"]); |
+ } |
+ return new Implementation(element, className: className); |
+ } else { |
+ throw jsonDecoder.mismatch(jsonPath, "Implementation", json); |
+ } |
+ } |
+ |
+ Map<String, dynamic> toJson() { |
+ Map<String, dynamic> result = {}; |
+ result["element"] = element.toJson(); |
+ if (className != null) { |
+ result["className"] = className; |
+ } |
+ return result; |
+ } |
+ |
+ @override |
+ String toString() => JSON.encode(toJson()); |
+ |
+ @override |
+ bool operator==(other) { |
+ if (other is Implementation) { |
+ return element == other.element && |
+ className == other.className; |
+ } |
+ return false; |
+ } |
+ |
+ @override |
+ int get hashCode { |
+ int hash = 0; |
+ hash = _JenkinsSmiHash.combine(hash, element.hashCode); |
+ hash = _JenkinsSmiHash.combine(hash, className.hashCode); |
+ return _JenkinsSmiHash.finish(hash); |
+ } |
+} |
+ |
+/** |
* LinkedEditGroup |
* |
* { |