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

Unified Diff: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationServerStatusProcessor.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/NotificationServerStatusProcessor.java
diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationServerStatusProcessor.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationServerStatusProcessor.java
index a609de595dcf39263c4c92539145020c962b4939..d5af0e112fe44b9eb69419eb934bca8c45a5c498 100644
--- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationServerStatusProcessor.java
+++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/processor/NotificationServerStatusProcessor.java
@@ -14,8 +14,7 @@
package com.google.dart.server.internal.remote.processor;
import com.google.dart.server.AnalysisServerListener;
-import com.google.dart.server.AnalysisStatus;
-import com.google.dart.server.ServerStatus;
+import com.google.dart.server.generated.types.AnalysisStatus;
import com.google.gson.JsonObject;
/**
@@ -31,13 +30,11 @@ public class NotificationServerStatusProcessor extends NotificationProcessor {
@Override
public void process(JsonObject response) throws Exception {
- ServerStatus serverStatus = new ServerStatus();
JsonObject paramsObject = response.get("params").getAsJsonObject();
JsonObject analysisObject = paramsObject.get("analysis").getAsJsonObject();
boolean analyzing = analysisObject.get("analyzing").getAsBoolean();
String analysisTarget = safelyGetAsString(analysisObject, "analysisTarget");
- serverStatus.setAnalysisStatus(new AnalysisStatus(analyzing, analysisTarget));
// notify listener
- getListener().serverStatus(serverStatus);
+ getListener().serverStatus(new AnalysisStatus(analyzing, analysisTarget));
}
}

Powered by Google App Engine
This is Rietveld 408576698