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

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

Issue 887793003: Avoid redundant notifications when a file is analyzed in multiple contexts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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
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 e980467c11cbca393c1ec6fc9a2802f43ed8b478..5b8d9837801f8443211b9453c39080e05770b26e 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -319,8 +319,11 @@ class AnalysisServer {
}
/**
- * Return the [AnalysisContext] that is used to analyze the given [path].
- * Return `null` if there is no such context.
+ * Return the preferred [AnalysisContext] for analyzing the given [path].
+ * This will be the context that explicitly contains the path, if any such
+ * context exists, otherwise it will be the first analysis context that
+ * implicitly analyzes it. Return `null` if no context is analyzing the
+ * path.
*/
AnalysisContext getAnalysisContext(String path) {
// try to find a containing context
@@ -334,8 +337,8 @@ class AnalysisServer {
}
/**
- * Return the [AnalysisContext] that is used to analyze the given [source].
- * Return `null` if there is no such context.
+ * Return any [AnalysisContext] that is analyzing the given [source], either
+ * explicitly or implicitly. Return `null` if there is no such context.
*/
AnalysisContext getAnalysisContextForSource(Source source) {
for (AnalysisContext context in folderMap.values) {

Powered by Google App Engine
This is Rietveld 408576698