| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AddContentOverlay.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AddContentOverlay.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AddContentOverlay.java
|
| index 2fc116cdb4a3c5124adf8c583c85e54ce2573217..dc3b11bfcc257655f8f471637e33ca46b2fb541b 100644
|
| --- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AddContentOverlay.java
|
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/AddContentOverlay.java
|
| @@ -19,10 +19,15 @@ package com.google.dart.server.generated.types;
|
| import java.util.Arrays;
|
| import java.util.List;
|
| import java.util.Map;
|
| +import com.google.common.collect.Lists;
|
| +import com.google.dart.server.utilities.general.JsonUtilities;
|
| import com.google.dart.server.utilities.general.ObjectUtilities;
|
| import com.google.gson.JsonArray;
|
| +import com.google.gson.JsonElement;
|
| import com.google.gson.JsonObject;
|
| import com.google.gson.JsonPrimitive;
|
| +import java.util.ArrayList;
|
| +import java.util.Iterator;
|
| import org.apache.commons.lang3.StringUtils;
|
|
|
| /**
|
| @@ -37,11 +42,10 @@ import org.apache.commons.lang3.StringUtils;
|
| @SuppressWarnings("unused")
|
| public class AddContentOverlay {
|
|
|
| - /**
|
| - * An empty array of {@link AddContentOverlay}s.
|
| - */
|
| public static final AddContentOverlay[] EMPTY_ARRAY = new AddContentOverlay[0];
|
|
|
| + public static final List<AddContentOverlay> EMPTY_LIST = Lists.newArrayList();
|
| +
|
| private final String type;
|
|
|
| /**
|
| @@ -68,6 +72,24 @@ public class AddContentOverlay {
|
| return false;
|
| }
|
|
|
| + public static AddContentOverlay fromJson(JsonObject jsonObject) {
|
| + String type = jsonObject.get("type").getAsString();
|
| + String content = jsonObject.get("content").getAsString();
|
| + return new AddContentOverlay(type, content);
|
| + }
|
| +
|
| + public static List<AddContentOverlay> fromJsonArray(JsonArray jsonArray) {
|
| + if (jsonArray == null) {
|
| + return EMPTY_LIST;
|
| + }
|
| + ArrayList<AddContentOverlay> list = new ArrayList<AddContentOverlay>(jsonArray.size());
|
| + Iterator<JsonElement> iterator = jsonArray.iterator();
|
| + while (iterator.hasNext()) {
|
| + list.add(fromJson(iterator.next().getAsJsonObject()));
|
| + }
|
| + return list;
|
| + }
|
| +
|
| /**
|
| * The new content of the file.
|
| */
|
|
|