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

Unified Diff: pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart

Issue 787663004: cache suggestions on change in priority sources (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 years 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/services/completion/imported_computer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart b/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
index 07b93f9a8231f3d3da76c122c0b7eae066a46394..c40763ca1ecb968f357952b5c27d0a25b3fd137f 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
@@ -75,6 +75,15 @@ class DartCompletionManager extends CompletionManager {
new DartCompletionCache(context, source));
}
+ @override
+ void computeCache() {
+ waitForAnalysis().then((CompilationUnit unit) {
+ if (unit != null && !cache.isImportInfoCached(unit)) {
+ cache.computeImportInfo(unit, searchEngine);
+ }
+ });
+ }
+
/**
* Compute suggestions based upon cached information only
* then send an initial response to the client.
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/imported_computer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698