| 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.task.html_work_manager; | 5 library analyzer.src.task.html_work_manager; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/error/error.dart'; | 9 import 'package:analyzer/error/error.dart'; |
| 10 import 'package:analyzer/src/context/cache.dart'; | 10 import 'package:analyzer/src/context/cache.dart'; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 /** | 34 /** |
| 35 * The HTML sources. | 35 * The HTML sources. |
| 36 */ | 36 */ |
| 37 final LinkedHashSet<Source> sourceQueue = new LinkedHashSet<Source>(); | 37 final LinkedHashSet<Source> sourceQueue = new LinkedHashSet<Source>(); |
| 38 | 38 |
| 39 /** | 39 /** |
| 40 * Initialize a newly created manager. | 40 * Initialize a newly created manager. |
| 41 */ | 41 */ |
| 42 HtmlWorkManager(this.context) { | 42 HtmlWorkManager(this.context) { |
| 43 analysisCache.onResultInvalidated.listen(onResultInvalidated); | 43 context.onResultInvalidated.listen(onResultInvalidated); |
| 44 } | 44 } |
| 45 | 45 |
| 46 /** | 46 /** |
| 47 * Returns the correctly typed result of `context.analysisCache`. | 47 * Returns the correctly typed result of `context.analysisCache`. |
| 48 */ | 48 */ |
| 49 AnalysisCache get analysisCache => context.analysisCache; | 49 AnalysisCache get analysisCache => context.analysisCache; |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 * The partition that contains analysis results that are not shared with other | 52 * The partition that contains analysis results that are not shared with other |
| 53 * contexts. | 53 * contexts. |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 return state != CacheState.VALID && state != CacheState.ERROR; | 243 return state != CacheState.VALID && state != CacheState.ERROR; |
| 244 } | 244 } |
| 245 | 245 |
| 246 /** | 246 /** |
| 247 * Return `true` if the given target is an HTML source. | 247 * Return `true` if the given target is an HTML source. |
| 248 */ | 248 */ |
| 249 static bool _isHtmlSource(AnalysisTarget target) { | 249 static bool _isHtmlSource(AnalysisTarget target) { |
| 250 return target is Source && AnalysisEngine.isHtmlFileName(target.fullName); | 250 return target is Source && AnalysisEngine.isHtmlFileName(target.fullName); |
| 251 } | 251 } |
| 252 } | 252 } |
| OLD | NEW |