| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Position.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Position.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Position.java
|
| index f1080155b880d8932bfc59578c5f3c7739a7f152..ce03a407b008ffb6082b6afdd32c4d0df69039dd 100644
|
| --- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Position.java
|
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Position.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,12 +46,12 @@ public class Position {
|
| /**
|
| * The offset of the position.
|
| */
|
| - private final int offset;
|
| + private final Integer offset;
|
|
|
| /**
|
| * Constructor for {@link Position}.
|
| */
|
| - public Position(String file, int offset) {
|
| + public Position(String file, Integer offset) {
|
| this.file = file;
|
| this.offset = offset;
|
| }
|
| @@ -74,10 +77,24 @@ public class Position {
|
| /**
|
| * The offset of the position.
|
| */
|
| - public int getOffset() {
|
| + public Integer getOffset() {
|
| return offset;
|
| }
|
|
|
| + public JsonObject toJson() {
|
| + // Create a JsonObject
|
| + JsonObject jsonObject = new JsonObject();
|
| +
|
| + // file
|
| + jsonObject.addProperty("file", file);
|
| +
|
| + // offset
|
| + jsonObject.addProperty("offset", offset);
|
| +
|
| + // Return the JsonObject
|
| + return jsonObject;
|
| + }
|
| +
|
| @Override
|
| public String toString() {
|
| StringBuilder builder = new StringBuilder();
|
|
|