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

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

Issue 402333006: Implementation of the 'edit.getFixes' API in server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 months 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/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`.
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/computer/error.dart » ('j') | pkg/analysis_server/lib/src/edit/edit_domain.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698