| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationExecutionLaunchDataProcessor.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationExecutionLaunchDataProcessor.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationExecutionLaunchDataProcessor.java
|
| index 3833f46aff60c4d40be221f72562a8aa08720bd0..bd3f74f17c4ea3eb83142ad0af29192c64de6e32 100644
|
| --- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationExecutionLaunchDataProcessor.java
|
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationExecutionLaunchDataProcessor.java
|
| @@ -14,17 +14,10 @@
|
| package com.google.dart.server.internal.remote.processor;
|
|
|
| import com.google.dart.server.AnalysisServerListener;
|
| -import com.google.dart.server.generated.types.ExecutableFile;
|
| -import com.google.dart.server.utilities.general.JsonUtilities;
|
| import com.google.gson.JsonArray;
|
| import com.google.gson.JsonElement;
|
| import com.google.gson.JsonObject;
|
|
|
| -import java.util.HashMap;
|
| -import java.util.List;
|
| -import java.util.Map;
|
| -import java.util.Map.Entry;
|
| -
|
| /**
|
| * Instances of the class {@code NotificationExecutionLaunchDataProcessor} process
|
| * "execution.launchData" notifications.
|
| @@ -44,29 +37,11 @@ public class NotificationExecutionLaunchDataProcessor extends NotificationProces
|
| @Override
|
| public void process(JsonObject response) throws Exception {
|
| JsonObject paramsObject = response.get("params").getAsJsonObject();
|
| - JsonArray executables = paramsObject.get("executables").getAsJsonArray();
|
| - JsonObject dartToHtml = paramsObject.get("dartToHtml").getAsJsonObject();
|
| - JsonObject htmlToDart = paramsObject.get("htmlToDart").getAsJsonObject();
|
| - getListener().computedLaunchData(
|
| - ExecutableFile.fromJsonArray(executables),
|
| - toMap(dartToHtml),
|
| - toMap(htmlToDart));
|
| - }
|
| -
|
| - /**
|
| - * Convert the given JSON object to a map of strings to lists of strings.
|
| - *
|
| - * @param object the object to be converted
|
| - * @return the result of converting the given JSON object to a map of strings to lists of strings
|
| - */
|
| - private Map<String, List<String>> toMap(JsonObject object) {
|
| - Map<String, List<String>> map = new HashMap<String, List<String>>();
|
| - for (Entry<String, JsonElement> entry : object.entrySet()) {
|
| - JsonElement value = entry.getValue();
|
| - if (value instanceof JsonArray) {
|
| - map.put(entry.getKey(), JsonUtilities.decodeStringList((JsonArray) value));
|
| - }
|
| - }
|
| - return map;
|
| + String file = paramsObject.get("file").getAsString();
|
| + JsonElement jsonKind = paramsObject.get("kind");
|
| + String kind = jsonKind == null ? null : jsonKind.getAsString();
|
| + JsonElement jsonFiles = paramsObject.get("referencedFiles");
|
| + JsonArray referencedFiles = jsonFiles == null ? null : jsonFiles.getAsJsonArray();
|
| + getListener().computedLaunchData(file, kind, constructStringArray(referencedFiles));
|
| }
|
| }
|
|
|