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

Unified Diff: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationAnalysisFlushResultsProcessor.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/NotificationAnalysisFlushResultsProcessor.java
diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationServerErrorProcessor.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationAnalysisFlushResultsProcessor.java
similarity index 64%
copy from editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationServerErrorProcessor.java
copy to editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationAnalysisFlushResultsProcessor.java
index 31b4002849005c2b0a8d3f8daa8cdff613e92e10..94b9497e83ae5dc89ae1cd41d985b37f1a45d24a 100644
--- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationServerErrorProcessor.java
+++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationAnalysisFlushResultsProcessor.java
@@ -14,26 +14,30 @@
package com.google.dart.server.internal.remote.processor;
import com.google.dart.server.AnalysisServerListener;
+import com.google.dart.server.utilities.general.JsonUtilities;
import com.google.gson.JsonObject;
+import java.util.List;
+
/**
- * Processor for "server.error" notification.
+ * Processor for "analysis.flushResults" notification.
*
* @coverage dart.server.remote
*/
-public class NotificationServerErrorProcessor extends NotificationProcessor {
+public class NotificationAnalysisFlushResultsProcessor extends NotificationProcessor {
- public NotificationServerErrorProcessor(AnalysisServerListener listener) {
+ public NotificationAnalysisFlushResultsProcessor(AnalysisServerListener listener) {
super(listener);
}
+ /**
+ * Process the given {@link JsonObject} notification and notify {@link #listener}.
+ */
@Override
public void process(JsonObject response) throws Exception {
JsonObject paramsObject = response.get("params").getAsJsonObject();
- boolean isFatal = paramsObject.get("fatal").getAsBoolean();
- String message = paramsObject.get("message").getAsString();
- String stackTrace = paramsObject.get("stackTrace").getAsString();
+ List<String> files = JsonUtilities.decodeStringList(paramsObject.get("files").getAsJsonArray());
// notify listener
- getListener().serverError(isFatal, message, stackTrace);
+ getListener().flushedResults(files);
}
}

Powered by Google App Engine
This is Rietveld 408576698