Index: pkg/analyzer/example/resolver_driver.dart |
diff --git a/pkg/analyzer/example/resolver_driver.dart b/pkg/analyzer/example/resolver_driver.dart |
index 08e40653b3a74fbe1f65a9a52808d27c6982e0e7..0992b76644affa99530ffd52df4846b6b91fafbe 100644 |
--- a/pkg/analyzer/example/resolver_driver.dart |
+++ b/pkg/analyzer/example/resolver_driver.dart |
@@ -1,18 +1,17 @@ |
#!/usr/bin/env dart |
- |
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-import 'package:analyzer/src/generated/java_io.dart'; |
-import 'package:analyzer/src/generated/source_io.dart'; |
+import 'dart:io'; |
+ |
import 'package:analyzer/src/generated/ast.dart'; |
-import 'package:analyzer/src/generated/sdk.dart' show DartSdk; |
-import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk; |
import 'package:analyzer/src/generated/element.dart'; |
import 'package:analyzer/src/generated/engine.dart'; |
- |
-import 'dart:io'; |
+import 'package:analyzer/src/generated/java_io.dart'; |
+import 'package:analyzer/src/generated/sdk.dart' show DartSdk; |
+import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk; |
+import 'package:analyzer/src/generated/source_io.dart'; |
main(List<String> args) { |
print('working dir ${new File('.').resolveSymbolicLinksSync()}'); |
@@ -26,7 +25,8 @@ main(List<String> args) { |
DartSdk sdk = DirectoryBasedDartSdk.defaultSdk; |
AnalysisContext context = AnalysisEngine.instance.createAnalysisContext(); |
- context.sourceFactory = new SourceFactory([new DartUriResolver(sdk), new FileUriResolver()]); |
+ context.sourceFactory = |
+ new SourceFactory([new DartUriResolver(sdk), new FileUriResolver()]); |
Source source = new FileBasedSource.con1(new JavaFile(args[1])); |
// |
ChangeSet changeSet = new ChangeSet(); |
@@ -35,7 +35,8 @@ main(List<String> args) { |
LibraryElement libElement = context.computeLibraryElement(source); |
print("libElement: $libElement"); |
- CompilationUnit resolvedUnit = context.resolveCompilationUnit(source, libElement); |
+ CompilationUnit resolvedUnit = |
+ context.resolveCompilationUnit(source, libElement); |
var visitor = new _ASTVisitor(); |
resolvedUnit.accept(visitor); |
} |
@@ -49,7 +50,8 @@ class _ASTVisitor extends GeneralizingAstVisitor { |
text += " element: ${element.runtimeType}"; |
LibraryElement library = element.library; |
if (library != null) { |
- text += " from ${element.library.definingCompilationUnit.source.fullName}"; |
+ text += |
+ " from ${element.library.definingCompilationUnit.source.fullName}"; |
} |
} |
} |
@@ -57,4 +59,3 @@ class _ASTVisitor extends GeneralizingAstVisitor { |
return super.visitNode(node); |
} |
} |
- |