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

Side by Side Diff: pkg/analyzer/tool/task_dependency_graph/generate.dart

Issue 2361813003: Fix test.py and tests to use an explicit --packages flag. (Closed)
Patch Set: Handle case where only observatory_ui tests are run. 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * This file contains code to output a description of tasks and their 6 * This file contains code to output a description of tasks and their
7 * dependencies in ".dot" format. Prior to running, the user should run "pub 7 * dependencies in ".dot" format. Prior to running, the user should run "pub
8 * get" in the analyzer directory to ensure that a "packages" folder exists. 8 * get" in the analyzer directory to ensure that a "packages" folder exists.
9 * 9 *
10 * TODO(paulberry): 10 * TODO(paulberry):
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 AnalysisEngine.instance.processRequiredPlugins(); 149 AnalysisEngine.instance.processRequiredPlugins();
150 hasInitializedPlugins = true; 150 hasInitializedPlugins = true;
151 } 151 }
152 List<String> lines = <String>[]; 152 List<String> lines = <String>[];
153 resourceProvider = PhysicalResourceProvider.INSTANCE; 153 resourceProvider = PhysicalResourceProvider.INSTANCE;
154 DartSdk sdk = new FolderBasedDartSdk(resourceProvider, 154 DartSdk sdk = new FolderBasedDartSdk(resourceProvider,
155 FolderBasedDartSdk.defaultSdkDirectory(resourceProvider)); 155 FolderBasedDartSdk.defaultSdkDirectory(resourceProvider));
156 context = AnalysisEngine.instance.createAnalysisContext(); 156 context = AnalysisEngine.instance.createAnalysisContext();
157 ContextBuilder builder = new ContextBuilder(resourceProvider, null, null); 157 ContextBuilder builder = new ContextBuilder(resourceProvider, null, null);
158 if (Platform.packageRoot != null) { 158 if (Platform.packageRoot != null) {
159 builder.defaultPackagesDirectoryPath = Uri.parse(Platform.packageRoot).toF ilePath(); 159 builder.defaultPackagesDirectoryPath =
160 Uri.parse(Platform.packageRoot).toFilePath();
160 } else if (Platform.packageConfig != null) { 161 } else if (Platform.packageConfig != null) {
161 builder.defaultPackageFilePath = Platform.packageConfig; 162 builder.defaultPackageFilePath =
163 Uri.parse(Platform.packageConfig).toFilePath();
162 } else { 164 } else {
163 // Let the context builder use the default algorithm for package 165 // Let the context builder use the default algorithm for package
164 // resolution. 166 // resolution.
165 } 167 }
166 List<UriResolver> uriResolvers = [ 168 List<UriResolver> uriResolvers = [
167 new DartUriResolver(sdk), 169 new DartUriResolver(sdk),
168 new PackageMapUriResolver(resourceProvider, 170 new PackageMapUriResolver(resourceProvider,
169 builder.convertPackagesToMap(builder.createPackageMap(''))), 171 builder.convertPackagesToMap(builder.createPackageMap(''))),
170 new ResourceUriResolver(PhysicalResourceProvider.INSTANCE) 172 new ResourceUriResolver(PhysicalResourceProvider.INSTANCE)
171 ]; 173 ];
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 @override 356 @override
355 visitIdentifier(Identifier node) { 357 visitIdentifier(Identifier node) {
356 Element element = node.staticElement; 358 Element element = node.staticElement;
357 if (element is PropertyAccessorElement && 359 if (element is PropertyAccessorElement &&
358 element.isGetter && 360 element.isGetter &&
359 element.returnType.isSubtypeOf(type)) { 361 element.returnType.isSubtypeOf(type)) {
360 callback(element); 362 callback(element);
361 } 363 }
362 } 364 }
363 } 365 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698