| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Outline.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Outline.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Outline.java
|
| index 816c37953360d7f6e9780c0b2591fdb578aad30f..88b065882c4f168fd22dc2ead8b8e635b09593ec 100644
|
| --- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Outline.java
|
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Outline.java
|
| @@ -91,28 +91,32 @@ public class Outline {
|
| return false;
|
| }
|
|
|
| - private Outline fromJson(Outline parent, JsonObject outlineObject) {
|
| - JsonObject elementObject = outlineObject.get("element").getAsJsonObject();
|
| - Element element = Element.fromJson(elementObject);
|
| - int offset = outlineObject.get("offset").getAsInt();
|
| - int length = outlineObject.get("length").getAsInt();
|
| -
|
| - // create outline object
|
| - Outline outline = new Outline(parent, element, offset, length);
|
| -
|
| - // compute children recursively
|
| - List<Outline> childrenList = Lists.newArrayList();
|
| - JsonElement childrenJsonArray = outlineObject.get("children");
|
| - if (childrenJsonArray instanceof JsonArray) {
|
| - Iterator<JsonElement> childrenElementIterator = ((JsonArray) childrenJsonArray).iterator();
|
| - while (childrenElementIterator.hasNext()) {
|
| - JsonObject childObject = childrenElementIterator.next().getAsJsonObject();
|
| - childrenList.add(fromJson(outline, childObject));
|
| - }
|
| + public static Outline fromJson(Outline parent, JsonObject outlineObject) {
|
| + JsonObject elementObject = outlineObject.get("element").getAsJsonObject();
|
| + Element element = Element.fromJson(elementObject);
|
| + int offset = outlineObject.get("offset").getAsInt();
|
| + int length = outlineObject.get("length").getAsInt();
|
| +
|
| + // create outline object
|
| + Outline outline = new Outline(parent, element, offset, length);
|
| +
|
| + // compute children recursively
|
| + List<Outline> childrenList = Lists.newArrayList();
|
| + JsonElement childrenJsonArray = outlineObject.get("children");
|
| + if (childrenJsonArray instanceof JsonArray) {
|
| + Iterator<JsonElement> childrenElementIterator = ((JsonArray) childrenJsonArray).iterator();
|
| + while (childrenElementIterator.hasNext()) {
|
| + JsonObject childObject = childrenElementIterator.next().getAsJsonObject();
|
| + childrenList.add(fromJson(outline, childObject));
|
| }
|
| - outline.setChildren(childrenList);
|
| - return outline;
|
| }
|
| + outline.setChildren(childrenList);
|
| + return outline;
|
| + }
|
| +
|
| + public Outline getParent() {
|
| + return parent;
|
| + }
|
|
|
| /**
|
| * The children of the node. The field will be omitted if the node has no children.
|
| @@ -155,8 +159,8 @@ public class Outline {
|
| }
|
|
|
| public void setChildren(List<Outline> children) {
|
| - this.children = children;
|
| - }
|
| + this.children = children;
|
| + }
|
|
|
| @Override
|
| public String toString() {
|
|
|