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

Unified Diff: pkg/analyzer/tool/task_dependency_graph/generate.dart

Issue 2425423009: Split out options from ContextBuilder (Closed)
Patch Set: Created 4 years, 2 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/test/stress/for_git_repository.dart ('k') | pkg/analyzer_cli/lib/src/driver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9761e90d0675c02a1593398b02afbb0bd2b0b05c..26745f6fdb8cf43455b0d8c36259fcf7f67fbd06 100644
--- a/pkg/analyzer/tool/task_dependency_graph/generate.dart
+++ b/pkg/analyzer/tool/task_dependency_graph/generate.dart
@@ -154,17 +154,19 @@ ${generateGraphData()}
DartSdk sdk = new FolderBasedDartSdk(resourceProvider,
FolderBasedDartSdk.defaultSdkDirectory(resourceProvider));
context = AnalysisEngine.instance.createAnalysisContext();
- ContextBuilder builder = new ContextBuilder(resourceProvider, null, null);
+ ContextBuilderOptions builderOptions = new ContextBuilderOptions();
if (Platform.packageRoot != null) {
- builder.defaultPackagesDirectoryPath =
- Uri.parse(Platform.packageRoot).toFilePath();
+ builderOptions.defaultPackagesDirectoryPath =
+ Uri.parse(Platform.packageRoot).toFilePath();
} else if (Platform.packageConfig != null) {
- builder.defaultPackageFilePath =
- Uri.parse(Platform.packageConfig).toFilePath();
+ builderOptions.defaultPackageFilePath =
+ Uri.parse(Platform.packageConfig).toFilePath();
} else {
// Let the context builder use the default algorithm for package
// resolution.
}
+ ContextBuilder builder = new ContextBuilder(resourceProvider, null, null,
+ options: builderOptions);
List<UriResolver> uriResolvers = [
new DartUriResolver(sdk),
new PackageMapUriResolver(resourceProvider,
« no previous file with comments | « pkg/analyzer/test/stress/for_git_repository.dart ('k') | pkg/analyzer_cli/lib/src/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698