| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisError.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisError.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisError.java
|
| index e30cd3f6b3bf28d4521e3d7ae814d558970b3d8c..d3efef5879631a683fada05e7303b74c0f17e29a 100644
|
| --- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisError.java
|
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AnalysisError.java
|
| @@ -20,6 +20,9 @@ import java.util.Arrays;
|
| import java.util.List;
|
| import java.util.Map;
|
| import com.google.dart.server.utilities.general.ObjectUtilities;
|
| +import com.google.gson.JsonArray;
|
| +import com.google.gson.JsonObject;
|
| +import com.google.gson.JsonPrimitive;
|
| import org.apache.commons.lang3.StringUtils;
|
|
|
| /**
|
| @@ -126,6 +129,31 @@ public class AnalysisError {
|
| return type;
|
| }
|
|
|
| + public JsonObject toJson() {
|
| + // Create a JsonObject
|
| + JsonObject jsonObject = new JsonObject();
|
| +
|
| + // severity
|
| + jsonObject.addProperty("severity", severity);
|
| +
|
| + // type
|
| + jsonObject.addProperty("type", type);
|
| +
|
| + // location
|
| + jsonObject.add("location", location.toJson());
|
| +
|
| + // message
|
| + jsonObject.addProperty("message", message);
|
| +
|
| + // correction
|
| + if (correction != null) {
|
| + jsonObject.addProperty("correction", correction);
|
| + }
|
| +
|
| + // Return the JsonObject
|
| + return jsonObject;
|
| + }
|
| +
|
| @Override
|
| public String toString() {
|
| StringBuilder builder = new StringBuilder();
|
|
|