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

Side by Side Diff: pkg/analyzer_cli/lib/src/driver.dart

Issue 2009303002: Embedder support refactoring (phase 1). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 library analyzer_cli.src.driver; 5 library analyzer_cli.src.driver;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 } 390 }
391 } 391 }
392 392
393 // Now, build our resolver list. 393 // Now, build our resolver list.
394 List<UriResolver> resolvers = []; 394 List<UriResolver> resolvers = [];
395 395
396 // 'dart:' URIs come first. 396 // 'dart:' URIs come first.
397 397
398 // Setup embedding. 398 // Setup embedding.
399 EmbedderUriResolver embedderUriResolver = 399 EmbedderUriResolver embedderUriResolver =
400 new EmbedderUriResolver(embedderMap); 400 new EmbedderUriResolver(new EmbedderSdk(embedderMap));
401 if (embedderUriResolver.length == 0) { 401 if (embedderUriResolver.length == 0) {
402 // The embedder uri resolver has no mappings. Use the default Dart SDK 402 // The embedder uri resolver has no mappings. Use the default Dart SDK
403 // uri resolver. 403 // uri resolver.
404 resolvers.add(new DartUriResolver(sdk)); 404 resolvers.add(new DartUriResolver(sdk));
405 } else { 405 } else {
406 // The embedder uri resolver has mappings, use it instead of the default 406 // The embedder uri resolver has mappings, use it instead of the default
407 // Dart SDK uri resolver. 407 // Dart SDK uri resolver.
408 resolvers.add(embedderUriResolver); 408 resolvers.add(embedderUriResolver);
409 } 409 }
410 410
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 for (var package in packages) { 845 for (var package in packages) {
846 var packageName = path.basename(package.path); 846 var packageName = path.basename(package.path);
847 var realPath = package.resolveSymbolicLinksSync(); 847 var realPath = package.resolveSymbolicLinksSync();
848 result[packageName] = [ 848 result[packageName] = [
849 PhysicalResourceProvider.INSTANCE.getFolder(realPath) 849 PhysicalResourceProvider.INSTANCE.getFolder(realPath)
850 ]; 850 ];
851 } 851 }
852 return result; 852 return result;
853 } 853 }
854 } 854 }
OLDNEW
« pkg/analyzer/test/source/embedder_test.dart ('K') | « pkg/analyzer/test/source/embedder_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698