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

Unified Diff: pkg/analyzer/example/resolver_driver.dart

Issue 2320733003: Remove final references to PackageUriResolver (Closed)
Patch Set: Created 4 years, 3 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 | « pkg/analyzer/benchmark/errors_in_all_libraries.dart ('k') | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « pkg/analyzer/benchmark/errors_in_all_libraries.dart ('k') | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698