| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/FoldingRegion.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/FoldingRegion.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/FoldingRegion.java
|
| index 1884e2033707afc890ecc1e42c6b2bf44421bd27..a3ab5f6c9a6425b3fc3557661f1e4df60c88e01b 100644
|
| --- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/FoldingRegion.java
|
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/FoldingRegion.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;
|
|
|
| /**
|
| @@ -43,17 +46,17 @@ public class FoldingRegion {
|
| /**
|
| * The offset of the region to be folded.
|
| */
|
| - private final int offset;
|
| + private final Integer offset;
|
|
|
| /**
|
| * The length of the region to be folded.
|
| */
|
| - private final int length;
|
| + private final Integer length;
|
|
|
| /**
|
| * Constructor for {@link FoldingRegion}.
|
| */
|
| - public FoldingRegion(String kind, int offset, int length) {
|
| + public FoldingRegion(String kind, Integer offset, Integer length) {
|
| this.kind = kind;
|
| this.offset = offset;
|
| this.length = length;
|
| @@ -81,17 +84,34 @@ public class FoldingRegion {
|
| /**
|
| * The length of the region to be folded.
|
| */
|
| - public int getLength() {
|
| + public Integer getLength() {
|
| return length;
|
| }
|
|
|
| /**
|
| * The offset of the region to be folded.
|
| */
|
| - public int getOffset() {
|
| + public Integer getOffset() {
|
| return offset;
|
| }
|
|
|
| + public JsonObject toJson() {
|
| + // Create a JsonObject
|
| + JsonObject jsonObject = new JsonObject();
|
| +
|
| + // kind
|
| + jsonObject.addProperty("kind", kind);
|
| +
|
| + // offset
|
| + jsonObject.addProperty("offset", offset);
|
| +
|
| + // length
|
| + jsonObject.addProperty("length", length);
|
| +
|
| + // Return the JsonObject
|
| + return jsonObject;
|
| + }
|
| +
|
| @Override
|
| public String toString() {
|
| StringBuilder builder = new StringBuilder();
|
|
|