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 6c7aae92c48bdb42885e76999a4b328fa638ca6f..12c6aa30b66dc07d8fff73363651bca3d686f628 100644 |
--- a/pkg/analysis_server/lib/src/analysis_server.dart |
+++ b/pkg/analysis_server/lib/src/analysis_server.dart |
@@ -1020,29 +1020,32 @@ class AnalysisServer { |
overlayState.setContents(source, newContents); |
// Update all contexts. |
for (InternalAnalysisContext context in folderMap.values) { |
- if (context.handleContentsChanged( |
- source, oldContents, newContents, true)) { |
- schedulePerformAnalysisOperation(context); |
- } else { |
- // When the client sends any change for a source, we should resend |
- // subscribed notifications, even if there were no changes in the |
- // source contents. |
- // TODO(scheglov) consider checking if there are subscriptions. |
- if (AnalysisEngine.isDartFileName(file)) { |
- List<CompilationUnit> dartUnits = |
- context.ensureResolvedDartUnits(source); |
- if (dartUnits != null) { |
- AnalysisErrorInfo errorInfo = context.getErrors(source); |
- for (var dartUnit in dartUnits) { |
- scheduleNotificationOperations(this, file, errorInfo.lineInfo, |
- context, null, dartUnit, errorInfo.errors); |
- scheduleIndexOperation(this, file, context, dartUnit); |
+ List<Source> sources = context.getSourcesWithFullName(file); |
+ sources.forEach((Source source) { |
+ if (context.handleContentsChanged( |
+ source, oldContents, newContents, true)) { |
+ schedulePerformAnalysisOperation(context); |
+ } else { |
+ // When the client sends any change for a source, we should resend |
+ // subscribed notifications, even if there were no changes in the |
+ // source contents. |
+ // TODO(scheglov) consider checking if there are subscriptions. |
+ if (AnalysisEngine.isDartFileName(file)) { |
+ List<CompilationUnit> dartUnits = |
+ context.ensureResolvedDartUnits(source); |
+ if (dartUnits != null) { |
+ AnalysisErrorInfo errorInfo = context.getErrors(source); |
+ for (var dartUnit in dartUnits) { |
+ scheduleNotificationOperations(this, file, errorInfo.lineInfo, |
+ context, null, dartUnit, errorInfo.errors); |
+ scheduleIndexOperation(this, file, context, dartUnit); |
+ } |
+ } else { |
+ schedulePerformAnalysisOperation(context); |
} |
- } else { |
- schedulePerformAnalysisOperation(context); |
} |
} |
- } |
+ }); |
} |
}); |
} |