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

Unified Diff: pkg/analysis_server/lib/src/generated_protocol.dart

Issue 496113002: Make RefactoringProblem.location optional. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/test/integration/protocol_matchers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c0a4b3bde47138a5ae01c268754bea68e1a4a2a5..fe6f6e0441694bfdeaca96688b52711f3fd68bbc 100644
--- a/pkg/analysis_server/lib/src/generated_protocol.dart
+++ b/pkg/analysis_server/lib/src/generated_protocol.dart
@@ -7452,7 +7452,7 @@ class RefactoringMethodParameterKind {
* {
* "severity": RefactoringProblemSeverity
* "message": String
- * "location": Location
+ * "location": optional Location
* }
*/
class RefactoringProblem implements HasToJson {
@@ -7467,11 +7467,13 @@ class RefactoringProblem implements HasToJson {
String message;
/**
- * The location of the problem being represented.
+ * The location of the problem being represented. This field is omitted
+ * unless there is a specific location associated with the problem (such as a
+ * location where an element being renamed will be shadowed).
*/
Location location;
- RefactoringProblem(this.severity, this.message, this.location);
+ RefactoringProblem(this.severity, this.message, {this.location});
factory RefactoringProblem.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
@@ -7493,10 +7495,8 @@ class RefactoringProblem implements HasToJson {
Location location;
if (json.containsKey("location")) {
location = new Location.fromJson(jsonDecoder, jsonPath + ".location", json["location"]);
- } else {
- throw jsonDecoder.missingKey(jsonPath, "location");
}
- return new RefactoringProblem(severity, message, location);
+ return new RefactoringProblem(severity, message, location: location);
} else {
throw jsonDecoder.mismatch(jsonPath, "RefactoringProblem");
}
@@ -7506,7 +7506,9 @@ class RefactoringProblem implements HasToJson {
Map<String, dynamic> result = {};
result["severity"] = severity.toJson();
result["message"] = message;
- result["location"] = location.toJson();
+ if (location != null) {
+ result["location"] = location.toJson();
+ }
return result;
}
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/test/integration/protocol_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698