Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationSearchResultsProcessor.java

Issue 474193003: Make more use of generated code in Java analysis server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationSearchResultsProcessor.java
diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationSearchResultsProcessor.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationSearchResultsProcessor.java
index 1165130588af8163d7cd097540424ce02356875f..50df23ef212fe459d7aad345b83a2e3dd98a8c17 100644
--- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationSearchResultsProcessor.java
+++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationSearchResultsProcessor.java
@@ -15,6 +15,8 @@ package com.google.dart.server.internal.remote.processor;
import com.google.dart.server.SearchResult;
import com.google.dart.server.SearchResultKind;
+import com.google.dart.server.generated.types.Element;
+import com.google.dart.server.generated.types.Location;
import com.google.dart.server.internal.BroadcastAnalysisServerListener;
import com.google.dart.server.internal.SearchResultImpl;
import com.google.gson.JsonArray;
@@ -59,9 +61,9 @@ public class NotificationSearchResultsProcessor extends NotificationProcessor {
private SearchResult constructSearchResult(JsonObject resultObject) {
return new SearchResultImpl(
- constructElementArray(resultObject.getAsJsonArray("path")),
+ Element.fromJsonArray(resultObject.getAsJsonArray("path")),
SearchResultKind.valueOf(resultObject.get("kind").getAsString()),
- constructLocation(resultObject.getAsJsonObject("location")),
+ Location.fromJson(resultObject.getAsJsonObject("location")),
resultObject.get("isPotential").getAsBoolean());
}
}

Powered by Google App Engine
This is Rietveld 408576698