| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/HighlightRegion.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/HighlightRegion.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/HighlightRegion.java
|
| index da97cf66574062c1a337333afbbca8ecd1952518..a4fbd5aeefecc347d06658905f964ab5d253d0e3 100644
|
| --- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/HighlightRegion.java
|
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/HighlightRegion.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 HighlightRegion {
|
| /**
|
| * The offset of the region to be highlighted.
|
| */
|
| - private final int offset;
|
| + private final Integer offset;
|
|
|
| /**
|
| * The length of the region to be highlighted.
|
| */
|
| - private final int length;
|
| + private final Integer length;
|
|
|
| /**
|
| * Constructor for {@link HighlightRegion}.
|
| */
|
| - public HighlightRegion(String type, int offset, int length) {
|
| + public HighlightRegion(String type, Integer offset, Integer length) {
|
| this.type = type;
|
| this.offset = offset;
|
| this.length = length;
|
| @@ -74,14 +77,14 @@ public class HighlightRegion {
|
| /**
|
| * The length of the region to be highlighted.
|
| */
|
| - public int getLength() {
|
| + public Integer getLength() {
|
| return length;
|
| }
|
|
|
| /**
|
| * The offset of the region to be highlighted.
|
| */
|
| - public int getOffset() {
|
| + public Integer getOffset() {
|
| return offset;
|
| }
|
|
|
| @@ -92,6 +95,23 @@ public class HighlightRegion {
|
| return type;
|
| }
|
|
|
| + public JsonObject toJson() {
|
| + // Create a JsonObject
|
| + JsonObject jsonObject = new JsonObject();
|
| +
|
| + // type
|
| + jsonObject.addProperty("type", type);
|
| +
|
| + // offset
|
| + jsonObject.addProperty("offset", offset);
|
| +
|
| + // length
|
| + jsonObject.addProperty("length", length);
|
| +
|
| + // Return the JsonObject
|
| + return jsonObject;
|
| + }
|
| +
|
| @Override
|
| public String toString() {
|
| StringBuilder builder = new StringBuilder();
|
|
|