Index: pkg/analyzer/example/resolver_driver.dart |
diff --git a/pkg/analyzer/example/resolver_driver.dart b/pkg/analyzer/example/resolver_driver.dart |
index 44d963511f373daf98beecf2b93125eb7b6e6d11..59e66e748feaebd05fa4dde92b922f08db3456ae 100755 |
--- a/pkg/analyzer/example/resolver_driver.dart |
+++ b/pkg/analyzer/example/resolver_driver.dart |
@@ -14,9 +14,6 @@ import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk; |
import 'package:analyzer/src/generated/source.dart'; |
import 'package:analyzer/src/generated/source_io.dart'; |
-const _usage = |
- 'Usage: resolve_driver <path_to_sdk> <file_to_resolve> [<packages_root>]'; |
- |
void main(List<String> args) { |
print('working dir ${new File('.').resolveSymbolicLinksSync()}'); |
@@ -43,7 +40,7 @@ void main(List<String> args) { |
AnalysisContext context = AnalysisEngine.instance.createAnalysisContext() |
..sourceFactory = new SourceFactory(resolvers); |
- Source source = new FileBasedSource.con1(new JavaFile(args[1])); |
+ Source source = new FileBasedSource(new JavaFile(args[1])); |
ChangeSet changeSet = new ChangeSet()..addedSource(source); |
context.applyChanges(changeSet); |
LibraryElement libElement = context.computeLibraryElement(source); |
@@ -55,6 +52,9 @@ void main(List<String> args) { |
resolvedUnit.accept(visitor); |
} |
+const _usage = |
+ 'Usage: resolve_driver <path_to_sdk> <file_to_resolve> [<packages_root>]'; |
+ |
class _ASTVisitor extends GeneralizingAstVisitor { |
visitNode(AstNode node) { |
var lines = <String>['${node.runtimeType} : <"$node">']; |