Index: pkg/analyzer/example/resolver_driver.dart |
diff --git a/pkg/analyzer/example/resolver_driver.dart b/pkg/analyzer/example/resolver_driver.dart |
index 73c5733dd8a30cc4c98892f7fac0fcd99db57dbc..cf68857d2283749a3975f2b7dc466745a5bf1b1f 100755 |
--- a/pkg/analyzer/example/resolver_driver.dart |
+++ b/pkg/analyzer/example/resolver_driver.dart |
@@ -10,9 +10,10 @@ import 'package:analyzer/dart/ast/visitor.dart'; |
import 'package:analyzer/dart/element/element.dart'; |
import 'package:analyzer/file_system/file_system.dart' hide File; |
import 'package:analyzer/file_system/physical_file_system.dart'; |
+import 'package:analyzer/source/package_map_resolver.dart'; |
+import 'package:analyzer/src/context/builder.dart'; |
import 'package:analyzer/src/dart/sdk/sdk.dart'; |
import 'package:analyzer/src/generated/engine.dart'; |
-import 'package:analyzer/src/generated/java_io.dart'; |
import 'package:analyzer/src/generated/sdk.dart' show DartSdk; |
import 'package:analyzer/src/generated/source.dart'; |
import 'package:analyzer/src/generated/source_io.dart'; |
@@ -41,8 +42,9 @@ void main(List<String> args) { |
]; |
if (packageRoot != null) { |
- var packageDirectory = new JavaFile(packageRoot); |
- resolvers.add(new PackageUriResolver([packageDirectory])); |
+ ContextBuilder builder = new ContextBuilder(resourceProvider, null, null); |
+ resolvers.add(new PackageMapUriResolver(resourceProvider, |
+ builder.convertPackagesToMap(builder.createPackageMap(packageRoot)))); |
scheglov
2016/09/07 19:11:39
We repeat this code in several clients.
Should we
Brian Wilkerson
2016/09/07 20:03:03
Eventually clients should be able to use an even h
|
} |
AnalysisContext context = AnalysisEngine.instance.createAnalysisContext() |