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

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

Issue 1468623002: Revert "Fix test failures on the bots" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years 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/src/task/strong/strong_test_helper.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 16 matching lines...) Expand all
27 import 'package:analyzer/src/generated/constant.dart'; 27 import 'package:analyzer/src/generated/constant.dart';
28 import 'package:analyzer/src/generated/element.dart'; 28 import 'package:analyzer/src/generated/element.dart';
29 import 'package:analyzer/src/generated/engine.dart'; 29 import 'package:analyzer/src/generated/engine.dart';
30 import 'package:analyzer/src/generated/java_io.dart'; 30 import 'package:analyzer/src/generated/java_io.dart';
31 import 'package:analyzer/src/generated/sdk.dart'; 31 import 'package:analyzer/src/generated/sdk.dart';
32 import 'package:analyzer/src/generated/sdk_io.dart'; 32 import 'package:analyzer/src/generated/sdk_io.dart';
33 import 'package:analyzer/src/generated/source.dart'; 33 import 'package:analyzer/src/generated/source.dart';
34 import 'package:analyzer/src/generated/source_io.dart'; 34 import 'package:analyzer/src/generated/source_io.dart';
35 import 'package:path/path.dart' as path; 35 import 'package:path/path.dart' as path;
36 import 'package:path/path.dart'; 36 import 'package:path/path.dart';
37 import 'package:plugin/manager.dart';
38 37
39 /** 38 /**
40 * Generate the target .dot file. 39 * Generate the target .dot file.
41 */ 40 */
42 main() { 41 main() {
43 String script = Platform.script.toFilePath(windows: Platform.isWindows); 42 String script = Platform.script.toFilePath(windows: Platform.isWindows);
44 String pkgPath = normalize(join(dirname(script), '..', '..')); 43 String pkgPath = normalize(join(dirname(script), '..', '..'));
45 GeneratedContent.generateAll(pkgPath, <GeneratedContent>[target]); 44 GeneratedContent.generateAll(pkgPath, <GeneratedContent>[target]);
46 } 45 }
47 46
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 node.accept(new GetterFinder(resultDescriptorType, resultDescriptors.add)); 113 node.accept(new GetterFinder(resultDescriptorType, resultDescriptors.add));
115 for (PropertyAccessorElement resultDescriptor in resultDescriptors) { 114 for (PropertyAccessorElement resultDescriptor in resultDescriptors) {
116 callback(resultDescriptor.name); 115 callback(resultDescriptor.name);
117 } 116 }
118 } 117 }
119 118
120 /** 119 /**
121 * Generate the task dependency graph and return it as a [String]. 120 * Generate the task dependency graph and return it as a [String].
122 */ 121 */
123 String generateFileContents() { 122 String generateFileContents() {
124 ExtensionManager extensionManager = new ExtensionManager();
125 extensionManager.processPlugins(AnalysisEngine.instance.supportedPlugins);
126
127 List<String> lines = <String>[]; 123 List<String> lines = <String>[];
128 resourceProvider = PhysicalResourceProvider.INSTANCE; 124 resourceProvider = PhysicalResourceProvider.INSTANCE;
129 DartSdk sdk = DirectoryBasedDartSdk.defaultSdk; 125 DartSdk sdk = DirectoryBasedDartSdk.defaultSdk;
130 context = AnalysisEngine.instance.createAnalysisContext(); 126 context = AnalysisEngine.instance.createAnalysisContext();
131 String packageRootPath; 127 String packageRootPath;
132 if (Platform.packageRoot.isNotEmpty) { 128 if (Platform.packageRoot.isNotEmpty) {
133 packageRootPath = Platform.packageRoot; 129 packageRootPath = Platform.packageRoot;
134 } else { 130 } else {
135 packageRootPath = path.join(rootDir, 'packages'); 131 packageRootPath = path.join(rootDir, 'packages');
136 } 132 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 @override 309 @override
314 visitIdentifier(Identifier node) { 310 visitIdentifier(Identifier node) {
315 Element element = node.staticElement; 311 Element element = node.staticElement;
316 if (element is PropertyAccessorElement && 312 if (element is PropertyAccessorElement &&
317 element.isGetter && 313 element.isGetter &&
318 element.returnType.isSubtypeOf(type)) { 314 element.returnType.isSubtypeOf(type)) {
319 callback(element); 315 callback(element);
320 } 316 }
321 } 317 }
322 } 318 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/task/strong/strong_test_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698