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

Unified Diff: pkg/analysis_server/lib/src/computer/new_notifications.dart

Issue 2465923002: Integration of the new analysis driver, behind a flag. (Closed)
Patch Set: Created 4 years, 1 month 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: pkg/analysis_server/lib/src/computer/new_notifications.dart
diff --git a/pkg/analysis_server/lib/src/computer/new_notifications.dart b/pkg/analysis_server/lib/src/computer/new_notifications.dart
new file mode 100644
index 0000000000000000000000000000000000000000..f1c6cee40f0f398ec9a2cefb9a0ced0d9574b979
--- /dev/null
+++ b/pkg/analysis_server/lib/src/computer/new_notifications.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/plugin/protocol/protocol.dart'
+ show AnalysisError;
+import 'package:analysis_server/src/analysis_server.dart' show AnalysisServer;
+import 'package:analysis_server/src/protocol_server.dart' as protocol;
+import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/generated/source.dart';
+
+void new_sendErrorNotification(
+ AnalysisServer analysisServer, AnalysisResult result) {
+ List<AnalysisError> serverErrors = <AnalysisError>[];
+ for (var error in result.errors) {
+ serverErrors
+ .add(protocol.newAnalysisError_fromEngine(new LineInfo([0]), error));
+ }
+ var params = new protocol.AnalysisErrorsParams(result.path, serverErrors);
+ analysisServer.sendNotification(params.toNotification());
+}

Powered by Google App Engine
This is Rietveld 408576698