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 77c8d88f19111919b0c5007eafc80257e6ccea0c..2b509da14c522bf54880d519fb1cc84a042b01db 100644 |
--- a/pkg/analysis_server/lib/src/analysis_server.dart |
+++ b/pkg/analysis_server/lib/src/analysis_server.dart |
@@ -551,7 +551,8 @@ class AnalysisServer { |
if (containingContext != null) { |
Source source = |
ContextManagerImpl.createSourceInContext(containingContext, file); |
- return new ContextSourcePair(containingContext, source); |
+ return new ContextSourcePair(containingContext, source, |
+ contained: true); |
} |
} |
// try to find a context that analysed the file |
@@ -1262,7 +1263,8 @@ class AnalysisServer { |
sources.forEach((Source source) { |
anyContextUpdated = true; |
if (context.handleContentsChanged( |
- source, oldContents, newContents, true)) { |
+ source, oldContents, newContents, true, |
+ explicit: contextSource.contained)) { |
skybrian
2016/03/02 06:35:34
Oops, this check should probably be something like
|
schedulePerformAnalysisOperation(context); |
} else { |
// When the client sends any change for a source, we should resend |
@@ -1440,7 +1442,13 @@ class ContextSourcePair { |
*/ |
final Source source; |
- ContextSourcePair(this.context, this.source); |
+ /** |
+ * If true, the source is contained within the directory associated |
+ * with the context. |
+ */ |
+ final bool contained; |
+ |
+ ContextSourcePair(this.context, this.source, {this.contained: false}); |
} |
/** |