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

Side by Side Diff: pkg/analyzer/lib/src/context/builder.dart

Issue 2710193004: Fix SummaryDataStore to support using a ResourceProvider instead of dart:io (Closed)
Patch Set: Fix SummaryDataStore to support using a ResourceProvider instead of dart:io Created 3 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/sdk/sdk.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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.src.context.context_builder; 5 library analyzer.src.context.context_builder;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:core'; 8 import 'dart:core';
9 9
10 import 'package:analyzer/context/declared_variables.dart'; 10 import 'package:analyzer/context/declared_variables.dart';
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 293 }
294 294
295 /** 295 /**
296 * Return the SDK that should be used to analyze code. Use the given 296 * Return the SDK that should be used to analyze code. Use the given
297 * [packageMap] and [analysisOptions] to locate the SDK. 297 * [packageMap] and [analysisOptions] to locate the SDK.
298 */ 298 */
299 DartSdk findSdk( 299 DartSdk findSdk(
300 Map<String, List<Folder>> packageMap, AnalysisOptions analysisOptions) { 300 Map<String, List<Folder>> packageMap, AnalysisOptions analysisOptions) {
301 String summaryPath = builderOptions.dartSdkSummaryPath; 301 String summaryPath = builderOptions.dartSdkSummaryPath;
302 if (summaryPath != null) { 302 if (summaryPath != null) {
303 return new SummaryBasedDartSdk(summaryPath, analysisOptions.strongMode); 303 return new SummaryBasedDartSdk(summaryPath, analysisOptions.strongMode,
304 resourceProvider: resourceProvider);
304 } else if (packageMap != null) { 305 } else if (packageMap != null) {
305 SdkExtensionFinder extFinder = new SdkExtensionFinder(packageMap); 306 SdkExtensionFinder extFinder = new SdkExtensionFinder(packageMap);
306 List<String> extFilePaths = extFinder.extensionFilePaths; 307 List<String> extFilePaths = extFinder.extensionFilePaths;
307 EmbedderYamlLocator locator = new EmbedderYamlLocator(packageMap); 308 EmbedderYamlLocator locator = new EmbedderYamlLocator(packageMap);
308 Map<Folder, YamlMap> embedderYamls = locator.embedderYamls; 309 Map<Folder, YamlMap> embedderYamls = locator.embedderYamls;
309 EmbedderSdk embedderSdk = 310 EmbedderSdk embedderSdk =
310 new EmbedderSdk(resourceProvider, embedderYamls); 311 new EmbedderSdk(resourceProvider, embedderYamls);
311 if (embedderSdk.sdkLibraries.length > 0) { 312 if (embedderSdk.sdkLibraries.length > 0) {
312 // 313 //
313 // There is an embedder file that defines the content of the SDK and 314 // There is an embedder file that defines the content of the SDK and
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 } 761 }
761 762
762 /** 763 /**
763 * Find the basic workspace that contains the given [path]. 764 * Find the basic workspace that contains the given [path].
764 */ 765 */
765 static _BasicWorkspace find( 766 static _BasicWorkspace find(
766 ResourceProvider resourceProvider, String path, ContextBuilder builder) { 767 ResourceProvider resourceProvider, String path, ContextBuilder builder) {
767 return new _BasicWorkspace._(resourceProvider, path, builder); 768 return new _BasicWorkspace._(resourceProvider, path, builder);
768 } 769 }
769 } 770 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/sdk/sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698