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

Side by Side Diff: pkg/analyzer/lib/src/analyzer_impl.dart

Issue 897593005: Adds a repeatable --url_mapping flag to dartanalyzer (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/options.dart ('k') | pkg/analyzer/lib/src/generated/source.dart » ('j') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library analyzer_impl; 5 library analyzer_impl;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 * then both will be printed. If [printMode] is `2`, then only performance 133 * then both will be printed. If [printMode] is `2`, then only performance
134 * information will be printed, and it will be marked as being for a cold VM. 134 * information will be printed, and it will be marked as being for a cold VM.
135 */ 135 */
136 ErrorSeverity analyzeSync({int printMode: 1}) { 136 ErrorSeverity analyzeSync({int printMode: 1}) {
137 setupForAnalysis(); 137 setupForAnalysis();
138 return _analyzeSync(printMode); 138 return _analyzeSync(printMode);
139 } 139 }
140 140
141 void prepareAnalysisContext(JavaFile sourceFile, Source source) { 141 void prepareAnalysisContext(JavaFile sourceFile, Source source) {
142 List<UriResolver> resolvers = [ 142 List<UriResolver> resolvers = [
143 new CustomUriResolver(options.customUrlMappings),
143 new DartUriResolver(sdk), 144 new DartUriResolver(sdk),
144 new FileUriResolver()]; 145 new FileUriResolver()];
145 // may be add package resolver 146 // may be add package resolver
146 { 147 {
147 JavaFile packageDirectory; 148 JavaFile packageDirectory;
148 if (options.packageRootPath != null) { 149 if (options.packageRootPath != null) {
149 packageDirectory = new JavaFile(options.packageRootPath); 150 packageDirectory = new JavaFile(options.packageRootPath);
150 resolvers.add(new PackageUriResolver([packageDirectory])); 151 resolvers.add(new PackageUriResolver([packageDirectory]));
151 } else { 152 } else {
152 PubPackageMapProvider pubPackageMapProvider = 153 PubPackageMapProvider pubPackageMapProvider =
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 } 431 }
431 } 432 }
432 433
433 @override 434 @override
434 void logInformation2(String message, Object exception) { 435 void logInformation2(String message, Object exception) {
435 if (log) { 436 if (log) {
436 stdout.writeln(message); 437 stdout.writeln(message);
437 } 438 }
438 } 439 }
439 } 440 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/options.dart ('k') | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698