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

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

Issue 2468223003: Include LineInfo into AnalysisResult to allow reporting errors with lines/columns. (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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/analysis/driver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
index f1c6cee40f0f398ec9a2cefb9a0ced0d9574b979..edbdc62b561075bfe6fe154c18a0f51c5dc7bbf7 100644
--- a/pkg/analysis_server/lib/src/computer/new_notifications.dart
+++ b/pkg/analysis_server/lib/src/computer/new_notifications.dart
@@ -2,19 +2,18 @@
// 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/plugin/protocol/protocol.dart' as protocol;
import 'package:analysis_server/src/analysis_server.dart' show AnalysisServer;
import 'package:analysis_server/src/protocol_server.dart' as protocol;
+import 'package:analyzer/error/error.dart';
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) {
+ var serverErrors = <protocol.AnalysisError>[];
+ for (AnalysisError error in result.errors) {
serverErrors
- .add(protocol.newAnalysisError_fromEngine(new LineInfo([0]), error));
+ .add(protocol.newAnalysisError_fromEngine(result.lineInfo, error));
}
var params = new protocol.AnalysisErrorsParams(result.path, serverErrors);
analysisServer.sendNotification(params.toNotification());
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/analysis/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698