Chromium Code Reviews| Index: pkg/analyzer/lib/src/generated/source.dart |
| diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart |
| index e4ceae7d5e77be2734924ba666dab8535b1581e9..1696bb926c3ce2a4e63c8796dd585a9f0dd770bf 100644 |
| --- a/pkg/analyzer/lib/src/generated/source.dart |
| +++ b/pkg/analyzer/lib/src/generated/source.dart |
| @@ -66,6 +66,17 @@ class ContentCache { |
| String getContents(Source source) => _contentMap[source.fullName]; |
| /** |
| + * Return `true` if the given [source] exists, `false` if it does not exist, |
| + * or `null` if this cache does not override existence of the source. |
|
Paul Berry
2017/01/04 18:28:57
It looks like you are trying to plan ahead to a po
scheglov
2017/01/04 20:07:27
I'm trying to extend ContentCache to fully control
|
| + * |
| + * <b>Note:</b> This method is not intended to be used except by |
| + * [AnalysisContext.exists]. |
| + */ |
| + bool getExists(Source source) { |
| + return _contentMap.containsKey(source.fullName) ? true : null; |
|
Brian Wilkerson
2017/01/04 18:05:10
Did you intend to return `null` rather than `false
|
| + } |
| + |
| + /** |
| * Return the modification stamp of the given [source], or `null` if this |
| * cache does not override the contents of the source. |
| * |