Chromium Code Reviews| 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 b2c2471d7a7372ca5d30f15bbe52bef073a56693..0f8e663dd89c65441144c1cf8ac65771f7594083 100644 |
| --- a/pkg/analyzer/lib/src/context/context.dart |
| +++ b/pkg/analyzer/lib/src/context/context.dart |
| @@ -115,6 +115,12 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
| AnalysisCache _cache; |
| /** |
| + * Configuration data associated with this context. |
| + */ |
| + final HashMap<ResultDescriptor, Object> _configurationData = |
| + <ResultDescriptor, Object>{}; |
|
scheglov
2015/10/14 18:20:04
new HashMap<>()
pquitslund
2015/10/14 22:31:45
Done.
|
| + |
| + /** |
| * The task manager used to manage the tasks used to analyze code. |
| */ |
| TaskManager _taskManager; |
| @@ -764,6 +770,9 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
| } |
| @override |
| + Object getConfigurationData(ResultDescriptor key) => _configurationData[key]; |
| + |
| + @override |
| TimestampedData<String> getContents(Source source) { |
| String contents = _contentCache.getContents(source); |
| if (contents != null) { |
| @@ -1201,6 +1210,11 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
| } |
| @override |
| + void setConfigurationData(ResultDescriptor key, Object data) { |
| + _configurationData[key] = data; |
| + } |
| + |
| + @override |
| void setContents(Source source, String contents) { |
| _contentsChanged(source, contents, true); |
| } |