Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Unified Diff: pkg/analyzer/tool/task_dependency_graph.dart

Issue 1411083002: Resolve some todos in the graph tool (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698