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

Unified Diff: pkg/analyzer/tool/task_dependency_graph/generate.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
Index: pkg/analyzer/tool/task_dependency_graph/generate.dart
diff --git a/pkg/analyzer/tool/task_dependency_graph/generate.dart b/pkg/analyzer/tool/task_dependency_graph/generate.dart
index 0caa453fa1f8c1b95de332eeaead5ad91ea6aeeb..3bd07967851f47cdc1d991a47d2f44812a329426 100644
--- a/pkg/analyzer/tool/task_dependency_graph/generate.dart
+++ b/pkg/analyzer/tool/task_dependency_graph/generate.dart
@@ -25,11 +25,12 @@ import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:analyzer/source/package_map_resolver.dart';
import 'package:analyzer/src/codegen/tools.dart';
+import 'package:analyzer/src/context/builder.dart';
import 'package:analyzer/src/dart/sdk/sdk.dart';
import 'package:analyzer/src/generated/constant.dart';
import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/java_io.dart';
import 'package:analyzer/src/generated/sdk.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/source_io.dart';
@@ -159,10 +160,13 @@ ${generateGraphData()}
} else {
packageRootPath = path.join(rootDir, 'packages');
}
- JavaFile packagesDir = new JavaFile(packageRootPath);
+ ContextBuilder builder = new ContextBuilder(resourceProvider, null, null);
List<UriResolver> uriResolvers = [
new DartUriResolver(sdk),
- new PackageUriResolver(<JavaFile>[packagesDir]),
+ new PackageMapUriResolver(
+ resourceProvider,
+ builder
+ .convertPackagesToMap(builder.createPackageMap(packageRootPath))),
new ResourceUriResolver(PhysicalResourceProvider.INSTANCE)
];
context.sourceFactory = new SourceFactory(uriResolvers);

Powered by Google App Engine
This is Rietveld 408576698