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

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

Issue 1829463002: Issue 26063. Index declarations in even partically analyzed units. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/services/index/index.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 4e5036dd4974c76e3f5e15156d4ea6c090582ac1..101348b6839ad8b34e39445cfb9720537b2da4a7 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -1471,6 +1471,16 @@ class AnalysisServer {
onContextsChanged.listen((ContextsChangedEvent event) {
for (AnalysisContext context in event.added) {
context
+ .onResultChanged(RESOLVED_UNIT2)
+ .listen((ResultChangedEvent event) {
+ if (event.wasComputed) {
+ Object value = event.value;
+ if (value is CompilationUnit) {
+ index.indexDeclarations(value);
+ }
+ }
+ });
+ context
.onResultChanged(RESOLVED_UNIT)
.listen((ResultChangedEvent event) {
if (event.wasInvalidated) {
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/index/index.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698