| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyzer.src.context.context; | 5 library analyzer.src.context.context; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analyzer/instrumentation/instrumentation.dart'; | 10 import 'package:analyzer/instrumentation/instrumentation.dart'; |
| (...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1758 void _sourceAvailable(Source source) { | 1758 void _sourceAvailable(Source source) { |
| 1759 driver.reset(); | 1759 driver.reset(); |
| 1760 // TODO(brianwilkerson) This method needs to check whether the source was | 1760 // TODO(brianwilkerson) This method needs to check whether the source was |
| 1761 // previously being implicitly analyzed. If so, the cache entry needs to be | 1761 // previously being implicitly analyzed. If so, the cache entry needs to be |
| 1762 // update to reflect the new status and an event needs to be generated to | 1762 // update to reflect the new status and an event needs to be generated to |
| 1763 // inform clients that it is no longer being implicitly analyzed. | 1763 // inform clients that it is no longer being implicitly analyzed. |
| 1764 CacheEntry entry = _cache.get(source); | 1764 CacheEntry entry = _cache.get(source); |
| 1765 if (entry == null) { | 1765 if (entry == null) { |
| 1766 _createCacheEntry(source, true); | 1766 _createCacheEntry(source, true); |
| 1767 } else { | 1767 } else { |
| 1768 entry.explicitlyAdded = true; |
| 1768 entry.modificationTime = getModificationStamp(source); | 1769 entry.modificationTime = getModificationStamp(source); |
| 1769 entry.setState(CONTENT, CacheState.INVALID); | 1770 entry.setState(CONTENT, CacheState.INVALID); |
| 1770 } | 1771 } |
| 1771 } | 1772 } |
| 1772 | 1773 |
| 1773 /** | 1774 /** |
| 1774 * Invalidate the [source] that was changed and any sources that referenced | 1775 * Invalidate the [source] that was changed and any sources that referenced |
| 1775 * the source before it existed. | 1776 * the source before it existed. |
| 1776 */ | 1777 */ |
| 1777 void _sourceChanged(Source source) { | 1778 void _sourceChanged(Source source) { |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2134 DartSdk sdk = factory.dartSdk; | 2135 DartSdk sdk = factory.dartSdk; |
| 2135 if (sdk == null) { | 2136 if (sdk == null) { |
| 2136 throw new IllegalArgumentException( | 2137 throw new IllegalArgumentException( |
| 2137 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2138 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
| 2138 } | 2139 } |
| 2139 return new AnalysisCache(<CachePartition>[ | 2140 return new AnalysisCache(<CachePartition>[ |
| 2140 AnalysisEngine.instance.partitionManager_new.forSdk(sdk) | 2141 AnalysisEngine.instance.partitionManager_new.forSdk(sdk) |
| 2141 ]); | 2142 ]); |
| 2142 } | 2143 } |
| 2143 } | 2144 } |
| OLD | NEW |