Index: pkg/analyzer/tool/task_dependency_graph.dart |
diff --git a/pkg/analyzer/tool/task_dependency_graph.dart b/pkg/analyzer/tool/task_dependency_graph.dart |
index ec28f5213b7825591388e306b8fa958a291faee6..2d46688b2cd9123465417d55dc11a5a6aa05fa2a 100644 |
--- a/pkg/analyzer/tool/task_dependency_graph.dart |
+++ b/pkg/analyzer/tool/task_dependency_graph.dart |
@@ -159,9 +159,7 @@ class Driver { |
for (ClassElement cls in dartDartUnitElement.types) { |
if (!cls.isAbstract && cls.type.isSubtypeOf(analysisTaskType)) { |
String task = cls.name; |
- // TODO(paulberry): node is deprecated. What am I supposed to do |
- // instead? |
- AstNode buildInputsAst = cls.getMethod('buildInputs').node; |
+ AstNode buildInputsAst = cls.getMethod('buildInputs').computeNode(); |
findResultDescriptors(buildInputsAst, (String input) { |
results.add(input); |
print(' $input -> $task'); |
@@ -170,13 +168,13 @@ class Driver { |
resultLists.add(input); |
print(' $input -> $task'); |
}); |
- findResultDescriptors(cls.getField('DESCRIPTOR').node, (String output) { |
+ findResultDescriptors(cls.getField('DESCRIPTOR').computeNode(), (String output) { |
results.add(output); |
print(' $task -> $output'); |
}); |
} |
} |
- AstNode enginePluginAst = enginePluginUnitElement.node; |
+ AstNode enginePluginAst = enginePluginUnitElement.computeNode(); |
for (String resultList in resultLists) { |
print(' $resultList [shape=hexagon]'); |
TopLevelVariableElement extensionIdVariable = _getExtensionId(resultList); |
@@ -215,13 +213,10 @@ class Driver { |
PropertyAccessorElement getter = |
enginePluginClass.getGetter(resultListGetterName); |
for (ElementAnnotation annotation in getter.metadata) { |
- // TODO(paulberry): we should be using part of the public API rather than |
- // just casting to ElementAnnotationImpl. |
- ElementAnnotationImpl annotationImpl = annotation; |
- DartObjectImpl annotationValue = annotationImpl.evaluationResult.value; |
+ DartObjectImpl annotationValue = annotation.constantValue; |
if (annotationValue.type.isSubtypeOf(extensionPointIdType)) { |
String extensionPointId = |
- annotationValue.fields['extensionPointId'].value; |
+ annotationValue.fields['extensionPointId'].toStringValue(); |
for (TopLevelVariableElement variable |
in taskUnitElement.topLevelVariables) { |
if (variable.name == extensionPointId) { |