| 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 /** | 5 /** |
| 6 * This file contains code to output a description of tasks and their | 6 * This file contains code to output a description of tasks and their |
| 7 * dependencies in ".dot" format. Prior to running, the user should run "pub | 7 * dependencies in ".dot" format. Prior to running, the user should run "pub |
| 8 * get" in the analyzer directory to ensure that a "packages" folder exists. | 8 * get" in the analyzer directory to ensure that a "packages" folder exists. |
| 9 * | 9 * |
| 10 * TODO(paulberry): | 10 * TODO(paulberry): |
| 11 * - Add general.dart and html.dart for completeness. | 11 * - Add general.dart and html.dart for completeness. |
| 12 * - Use Graphviz's "record" feature to produce more compact output | 12 * - Use Graphviz's "record" feature to produce more compact output |
| 13 * (http://www.graphviz.org/content/node-shapes#record) | 13 * (http://www.graphviz.org/content/node-shapes#record) |
| 14 * - Produce a warning if a result descriptor is found which isn't the output | 14 * - Produce a warning if a result descriptor is found which isn't the output |
| 15 * of exactly one task. | 15 * of exactly one task. |
| 16 * - Convert this tool to use package_config to find the package map. | 16 * - Convert this tool to use package_config to find the package map. |
| 17 */ | 17 */ |
| 18 library task_dependency_graph.generate; | 18 library analyzer.tool.task_dependency_graph.generate; |
| 19 | 19 |
| 20 import 'dart:io' hide File; | 20 import 'dart:io' hide File; |
| 21 import 'dart:io' as io; | 21 import 'dart:io' as io; |
| 22 | 22 |
| 23 import 'package:analyzer/analyzer.dart'; | 23 import 'package:analyzer/analyzer.dart'; |
| 24 import 'package:analyzer/file_system/file_system.dart'; | 24 import 'package:analyzer/file_system/file_system.dart'; |
| 25 import 'package:analyzer/file_system/physical_file_system.dart'; | 25 import 'package:analyzer/file_system/physical_file_system.dart'; |
| 26 import 'package:analyzer/src/codegen/tools.dart'; | 26 import 'package:analyzer/src/codegen/tools.dart'; |
| 27 import 'package:analyzer/src/generated/constant.dart'; | 27 import 'package:analyzer/src/generated/constant.dart'; |
| 28 import 'package:analyzer/src/generated/element.dart'; | 28 import 'package:analyzer/src/generated/element.dart'; |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 @override | 310 @override |
| 311 visitIdentifier(Identifier node) { | 311 visitIdentifier(Identifier node) { |
| 312 Element element = node.staticElement; | 312 Element element = node.staticElement; |
| 313 if (element is PropertyAccessorElement && | 313 if (element is PropertyAccessorElement && |
| 314 element.isGetter && | 314 element.isGetter && |
| 315 element.returnType.isSubtypeOf(type)) { | 315 element.returnType.isSubtypeOf(type)) { |
| 316 callback(element); | 316 callback(element); |
| 317 } | 317 } |
| 318 } | 318 } |
| 319 } | 319 } |
| OLD | NEW |