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.task.model; | 5 library analyzer.task.model; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'dart:developer'; | 8 import 'dart:developer'; |
9 | 9 |
| 10 import 'package:analyzer/exception/exception.dart'; |
10 import 'package:analyzer/src/generated/engine.dart'; | 11 import 'package:analyzer/src/generated/engine.dart'; |
11 import 'package:analyzer/src/generated/error.dart' show AnalysisError; | 12 import 'package:analyzer/src/generated/error.dart' show AnalysisError; |
12 import 'package:analyzer/src/generated/java_engine.dart'; | |
13 import 'package:analyzer/src/generated/source.dart'; | 13 import 'package:analyzer/src/generated/source.dart'; |
14 import 'package:analyzer/src/generated/utilities_general.dart'; | 14 import 'package:analyzer/src/generated/utilities_general.dart'; |
15 import 'package:analyzer/src/task/driver.dart'; | 15 import 'package:analyzer/src/task/driver.dart'; |
16 import 'package:analyzer/src/task/model.dart'; | 16 import 'package:analyzer/src/task/model.dart'; |
17 | 17 |
18 /** | 18 /** |
19 * A function that converts the given [key] and [value] into a [TaskInput]. | 19 * A function that converts the given [key] and [value] into a [TaskInput]. |
20 */ | 20 */ |
21 typedef TaskInput<E> BinaryFunction<K, V, E>(K key, V value); | 21 typedef TaskInput<E> BinaryFunction<K, V, E>(K key, V value); |
22 | 22 |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 // This edge is in a cycle (or leads to a cycle) so add it to the | 277 // This edge is in a cycle (or leads to a cycle) so add it to the |
278 // path | 278 // path |
279 path.add(result); | 279 path.add(result); |
280 return true; | 280 return true; |
281 } | 281 } |
282 } | 282 } |
283 } | 283 } |
284 // There was no cycle. | 284 // There was no cycle. |
285 return false; | 285 return false; |
286 } | 286 } |
| 287 |
287 if (cycle.length > 0) { | 288 if (cycle.length > 0) { |
288 traverse(cycle[0]); | 289 traverse(cycle[0]); |
289 } | 290 } |
290 return path; | 291 return path; |
291 } | 292 } |
292 | 293 |
293 /** | 294 /** |
294 * Perform this analysis task, ensuring that all exceptions are wrapped in an | 295 * Perform this analysis task, ensuring that all exceptions are wrapped in an |
295 * [AnalysisException]. | 296 * [AnalysisException]. |
296 * | 297 * |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 /** | 795 /** |
795 * A work should be done, but without any special urgency. | 796 * A work should be done, but without any special urgency. |
796 */ | 797 */ |
797 NORMAL, | 798 NORMAL, |
798 | 799 |
799 /** | 800 /** |
800 * Nothing to do. | 801 * Nothing to do. |
801 */ | 802 */ |
802 NONE | 803 NONE |
803 } | 804 } |
OLD | NEW |