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

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

Issue 2989633002: Issue 30238. Fix for subscribing for a notifications with already cached analysis result. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | pkg/analysis_server/test/analysis/notification_outline_test.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 57938216bc0fb33901fc3c77ed4172c23dc8f703..261a13d58c6f46dccfca85ebaa56ab16674a6c59 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -560,14 +560,16 @@ class AnalysisServer {
* analyzed in one of the analysis drivers to which the file was added,
* otherwise in the first driver, otherwise `null` is returned.
*/
- Future<nd.AnalysisResult> getAnalysisResult(String path) async {
+ Future<nd.AnalysisResult> getAnalysisResult(String path,
+ {bool sendCachedToStream: false}) async {
if (!AnalysisEngine.isDartFileName(path)) {
return null;
}
try {
nd.AnalysisDriver driver = getAnalysisDriver(path);
- return await driver?.getResult(path);
+ return await driver?.getResult(path,
+ sendCachedToStream: sendCachedToStream);
} catch (e) {
// Ignore the exception.
// We don't want to log the same exception again and again.
@@ -871,7 +873,7 @@ class AnalysisServer {
// the fully resolved unit, and processed with sending analysis
// notifications as it happens after content changes.
if (AnalysisEngine.isDartFileName(file)) {
- getAnalysisResult(file);
+ getAnalysisResult(file, sendCachedToStream: true);
}
}
}
« no previous file with comments | « no previous file | pkg/analysis_server/test/analysis/notification_outline_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698