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

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

Issue 2965533002: Use AnalysisDriver.getCachedResult() for 'implemented' notification. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/operation/operation_analysis.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 06d88ee4f20734114f70f4ec006cf61b2cd4dbd7..799e72bbb738d0e1442003de186ddfee127c8c1a 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -587,6 +587,19 @@ class AnalysisServer {
}
/**
+ * Return the cached analysis result for the file with the given [path].
+ * If there is no cached result, return `null`.
+ */
+ nd.AnalysisResult getCachedAnalysisResult(String path) {
+ if (!AnalysisEngine.isDartFileName(path)) {
+ return null;
+ }
+
+ nd.AnalysisDriver driver = getAnalysisDriver(path);
+ return driver?.getCachedResult(path);
+ }
+
+ /**
* Return the [nd.AnalysisDriver] for the "innermost" context whose associated
* folder is or contains the given path. ("innermost" refers to the nesting
* of contexts, so if there is a context for path /foo and a context for
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/operation/operation_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698