| 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.options_work_manager; | 5 library analyzer.src.task.options_work_manager; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/src/context/cache.dart'; | 9 import 'package:analyzer/src/context/cache.dart'; |
| 10 import 'package:analyzer/src/generated/engine.dart' | 10 import 'package:analyzer/src/generated/engine.dart' |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 } | 162 } |
| 163 | 163 |
| 164 /// Returns `true` if the given [result] of the given [target] needs | 164 /// Returns `true` if the given [result] of the given [target] needs |
| 165 /// computing, i.e. it is not in the valid and not in the error state. | 165 /// computing, i.e. it is not in the valid and not in the error state. |
| 166 bool _needsComputing(AnalysisTarget target, ResultDescriptor result) { | 166 bool _needsComputing(AnalysisTarget target, ResultDescriptor result) { |
| 167 CacheState state = analysisCache.getState(target, result); | 167 CacheState state = analysisCache.getState(target, result); |
| 168 return state != CacheState.VALID && state != CacheState.ERROR; | 168 return state != CacheState.VALID && state != CacheState.ERROR; |
| 169 } | 169 } |
| 170 | 170 |
| 171 /// Return `true` if the given target is an `.analysis_options` source. | 171 /// Return `true` if the given target is an `.analysis_options` source. |
| 172 static bool _isOptionsSource(AnalysisTarget target) => target is Source && | 172 static bool _isOptionsSource(AnalysisTarget target) => |
| 173 target is Source && |
| 173 AnalysisEngine.isAnalysisOptionsFileName(target.fullName); | 174 AnalysisEngine.isAnalysisOptionsFileName(target.fullName); |
| 174 } | 175 } |
| OLD | NEW |