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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/analysis/driver.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:analysis_server/plugin/protocol/protocol.dart' 5 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol;
6 show AnalysisError;
7 import 'package:analysis_server/src/analysis_server.dart' show AnalysisServer; 6 import 'package:analysis_server/src/analysis_server.dart' show AnalysisServer;
8 import 'package:analysis_server/src/protocol_server.dart' as protocol; 7 import 'package:analysis_server/src/protocol_server.dart' as protocol;
8 import 'package:analyzer/error/error.dart';
9 import 'package:analyzer/src/dart/analysis/driver.dart'; 9 import 'package:analyzer/src/dart/analysis/driver.dart';
10 import 'package:analyzer/src/generated/source.dart';
11 10
12 void new_sendErrorNotification( 11 void new_sendErrorNotification(
13 AnalysisServer analysisServer, AnalysisResult result) { 12 AnalysisServer analysisServer, AnalysisResult result) {
14 List<AnalysisError> serverErrors = <AnalysisError>[]; 13 var serverErrors = <protocol.AnalysisError>[];
15 for (var error in result.errors) { 14 for (AnalysisError error in result.errors) {
16 serverErrors 15 serverErrors
17 .add(protocol.newAnalysisError_fromEngine(new LineInfo([0]), error)); 16 .add(protocol.newAnalysisError_fromEngine(result.lineInfo, error));
18 } 17 }
19 var params = new protocol.AnalysisErrorsParams(result.path, serverErrors); 18 var params = new protocol.AnalysisErrorsParams(result.path, serverErrors);
20 analysisServer.sendNotification(params.toNotification()); 19 analysisServer.sendNotification(params.toNotification());
21 } 20 }
OLDNEW
« 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