Chromium Code Reviews| Index: pkg/analysis_server/lib/src/analysis_server.dart |
| diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart |
| index 34d077de2631ba55153c3dbc6359ca14b4933e4b..c7a1feb3e10382d2610aeaacf0c130609589dda4 100644 |
| --- a/pkg/analysis_server/lib/src/analysis_server.dart |
| +++ b/pkg/analysis_server/lib/src/analysis_server.dart |
| @@ -555,6 +555,22 @@ class AnalysisServer { |
| } |
| /** |
| + * Returns all the [AnalysisErrorInfo] for [file]. |
| + * |
| + * May return `null`. |
| + */ |
| + AnalysisErrorInfo getErrors(String file) { |
| + // prepare AnalysisContext |
| + AnalysisContext context = getAnalysisContext(file); |
| + if (context == null) { |
| + return null; |
|
Paul Berry
2014/07/22 20:22:06
Does this mean that the result will be {..., "resu
scheglov
2014/07/22 20:31:31
It is OK for "edit.getFixes" though.
Paul Berry
2014/07/22 20:41:43
Oh, ok. I was confused because the method name so
scheglov
2014/07/22 20:53:08
Done.
|
| + } |
| + // get errors for the file |
| + Source source = getSource(file); |
| + return context.getErrors(source); |
|
Paul Berry
2014/07/22 20:22:06
Judging from the implementation in AnalysisContext
scheglov
2014/07/22 20:31:31
It's not an implementation of the "analysis.getErr
|
| + } |
| + |
| + /** |
| * Returns resolved [CompilationUnit]s of the Dart file with the given [path]. |
| * |
| * May be empty, but not `null`. |