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

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

Issue 1414763002: Fix task model grapher to use package root. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | 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 167198a1fcf427a761ca532d9a7816059a4d0ecd..235c2b9d032b7bee4592cab847b620d9135478b9 100644
--- a/pkg/analyzer/tool/task_dependency_graph/generate.dart
+++ b/pkg/analyzer/tool/task_dependency_graph/generate.dart
@@ -138,7 +138,13 @@ class Driver {
resourceProvider = PhysicalResourceProvider.INSTANCE;
DartSdk sdk = DirectoryBasedDartSdk.defaultSdk;
context = AnalysisEngine.instance.createAnalysisContext();
- JavaFile packagesDir = new JavaFile(path.join(rootDir, 'packages'));
+ String packageRootPath;
+ if (Platform.packageRoot.isNotEmpty) {
+ packageRootPath = Platform.packageRoot;
+ } else {
+ packageRootPath = path.join(rootDir, 'packages');
+ }
+ JavaFile packagesDir = new JavaFile(packageRootPath);
List<UriResolver> uriResolvers = [
new DartUriResolver(sdk),
new PackageUriResolver(<JavaFile>[packagesDir]),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698