Index: pkg/analyzer/lib/src/context/context.dart |
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart |
index 6b15c8eab0f4affaad0be1617be5c2b8ff877e1b..d8efc31b06ce8bf733fbe2db767cc69028490b3c 100644 |
--- a/pkg/analyzer/lib/src/context/context.dart |
+++ b/pkg/analyzer/lib/src/context/context.dart |
@@ -78,6 +78,11 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
final int _id = _NEXT_ID++; |
/** |
+ * The flag that is `true` if the context is being analyzed. |
+ */ |
+ bool _isActive = false; |
+ |
+ /** |
* A client-provided name used to identify this context, or `null` if the |
* client has not provided a name. |
*/ |
@@ -397,6 +402,17 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
_implicitAnalysisEventsController.stream; |
@override |
+ bool get isActive => _isActive; |
+ |
+ @override |
+ set isActive(bool active) { |
+ if (active != _isActive) { |
+ _isActive = active; |
+ _privatePartition.isActive = active; |
+ } |
+ } |
+ |
+ @override |
bool get isDisposed => _disposed; |
@override |