OLD | NEW |
(Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 import 'package:analysis_server/plugin/protocol/protocol.dart' |
| 6 show AnalysisError; |
| 7 import 'package:analysis_server/src/analysis_server.dart' show AnalysisServer; |
| 8 import 'package:analysis_server/src/protocol_server.dart' as protocol; |
| 9 import 'package:analyzer/src/dart/analysis/driver.dart'; |
| 10 import 'package:analyzer/src/generated/source.dart'; |
| 11 |
| 12 void new_sendErrorNotification( |
| 13 AnalysisServer analysisServer, AnalysisResult result) { |
| 14 List<AnalysisError> serverErrors = <AnalysisError>[]; |
| 15 for (var error in result.errors) { |
| 16 serverErrors |
| 17 .add(protocol.newAnalysisError_fromEngine(new LineInfo([0]), error)); |
| 18 } |
| 19 var params = new protocol.AnalysisErrorsParams(result.path, serverErrors); |
| 20 analysisServer.sendNotification(params.toNotification()); |
| 21 } |
OLD | NEW |