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

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

Issue 2078703002: Provide direction to users of the now deprecated class FileUriResolver (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « pkg/analyzer/test/generated/source_factory_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 String packageRootPath; 155 String packageRootPath;
156 if (Platform.packageRoot != null) { 156 if (Platform.packageRoot != null) {
157 packageRootPath = Uri.parse(Platform.packageRoot).toFilePath(); 157 packageRootPath = Uri.parse(Platform.packageRoot).toFilePath();
158 } else { 158 } else {
159 packageRootPath = path.join(rootDir, 'packages'); 159 packageRootPath = path.join(rootDir, 'packages');
160 } 160 }
161 JavaFile packagesDir = new JavaFile(packageRootPath); 161 JavaFile packagesDir = new JavaFile(packageRootPath);
162 List<UriResolver> uriResolvers = [ 162 List<UriResolver> uriResolvers = [
163 new DartUriResolver(sdk), 163 new DartUriResolver(sdk),
164 new PackageUriResolver(<JavaFile>[packagesDir]), 164 new PackageUriResolver(<JavaFile>[packagesDir]),
165 new FileUriResolver() 165 new ResourceUriResolver(PhysicalResourceProvider.INSTANCE)
166 ]; 166 ];
167 context.sourceFactory = new SourceFactory(uriResolvers); 167 context.sourceFactory = new SourceFactory(uriResolvers);
168 Source dartDartSource = 168 Source dartDartSource =
169 setupSource(path.join('lib', 'src', 'task', 'dart.dart')); 169 setupSource(path.join('lib', 'src', 'task', 'dart.dart'));
170 Source taskSource = setupSource(path.join('lib', 'plugin', 'task.dart')); 170 Source taskSource = setupSource(path.join('lib', 'plugin', 'task.dart'));
171 Source modelSource = setupSource(path.join('lib', 'task', 'model.dart')); 171 Source modelSource = setupSource(path.join('lib', 'task', 'model.dart'));
172 Source enginePluginSource = 172 Source enginePluginSource =
173 setupSource(path.join('lib', 'src', 'plugin', 'engine_plugin.dart')); 173 setupSource(path.join('lib', 'src', 'plugin', 'engine_plugin.dart'));
174 CompilationUnitElement modelElement = getUnit(modelSource).element; 174 CompilationUnitElement modelElement = getUnit(modelSource).element;
175 InterfaceType analysisTaskType = modelElement.getType('AnalysisTask').type; 175 InterfaceType analysisTaskType = modelElement.getType('AnalysisTask').type;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 @override 349 @override
350 visitIdentifier(Identifier node) { 350 visitIdentifier(Identifier node) {
351 Element element = node.staticElement; 351 Element element = node.staticElement;
352 if (element is PropertyAccessorElement && 352 if (element is PropertyAccessorElement &&
353 element.isGetter && 353 element.isGetter &&
354 element.returnType.isSubtypeOf(type)) { 354 element.returnType.isSubtypeOf(type)) {
355 callback(element); 355 callback(element);
356 } 356 }
357 } 357 }
358 } 358 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/source_factory_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698