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

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

Issue 2079873002: Initial Bazel file resolver support. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebase 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
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.src.context.context; 5 library analyzer.src.context.context;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
11 import 'package:analyzer/dart/element/element.dart'; 11 import 'package:analyzer/dart/element/element.dart';
12 import 'package:analyzer/dart/element/type.dart'; 12 import 'package:analyzer/dart/element/type.dart';
13 import 'package:analyzer/instrumentation/instrumentation.dart'; 13 import 'package:analyzer/instrumentation/instrumentation.dart';
14 import 'package:analyzer/plugin/resolver_provider.dart';
14 import 'package:analyzer/plugin/task.dart'; 15 import 'package:analyzer/plugin/task.dart';
15 import 'package:analyzer/source/embedder.dart'; 16 import 'package:analyzer/source/embedder.dart';
16 import 'package:analyzer/src/cancelable_future.dart'; 17 import 'package:analyzer/src/cancelable_future.dart';
17 import 'package:analyzer/src/context/cache.dart'; 18 import 'package:analyzer/src/context/cache.dart';
18 import 'package:analyzer/src/dart/element/element.dart'; 19 import 'package:analyzer/src/dart/element/element.dart';
19 import 'package:analyzer/src/dart/element/type.dart'; 20 import 'package:analyzer/src/dart/element/type.dart';
20 import 'package:analyzer/src/generated/constant.dart'; 21 import 'package:analyzer/src/generated/constant.dart';
21 import 'package:analyzer/src/generated/engine.dart'; 22 import 'package:analyzer/src/generated/engine.dart';
22 import 'package:analyzer/src/generated/error.dart'; 23 import 'package:analyzer/src/generated/error.dart';
23 import 'package:analyzer/src/generated/incremental_resolver.dart'; 24 import 'package:analyzer/src/generated/incremental_resolver.dart';
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 * resolved. 222 * resolved.
222 */ 223 */
223 Source incrementalResolutionValidation_lastLibrarySource; 224 Source incrementalResolutionValidation_lastLibrarySource;
224 225
225 /** 226 /**
226 * The result of incremental resolution result of 227 * The result of incremental resolution result of
227 * [incrementalResolutionValidation_lastUnitSource]. 228 * [incrementalResolutionValidation_lastUnitSource].
228 */ 229 */
229 CompilationUnit incrementalResolutionValidation_lastUnit; 230 CompilationUnit incrementalResolutionValidation_lastUnit;
230 231
232 @override
233 ResolverProvider fileResolverProvider;
234
231 /** 235 /**
232 * Initialize a newly created analysis context. 236 * Initialize a newly created analysis context.
233 */ 237 */
234 AnalysisContextImpl() { 238 AnalysisContextImpl() {
235 _privatePartition = new UniversalCachePartition(this); 239 _privatePartition = new UniversalCachePartition(this);
236 _cache = createCacheFromSourceFactory(null); 240 _cache = createCacheFromSourceFactory(null);
237 _taskManager = AnalysisEngine.instance.taskManager; 241 _taskManager = AnalysisEngine.instance.taskManager;
238 for (WorkManagerFactory factory 242 for (WorkManagerFactory factory
239 in AnalysisEngine.instance.enginePlugin.workManagerFactories) { 243 in AnalysisEngine.instance.enginePlugin.workManagerFactories) {
240 WorkManager workManager = factory(this); 244 WorkManager workManager = factory(this);
(...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 } 2236 }
2233 DartSdk sdk = factory.dartSdk; 2237 DartSdk sdk = factory.dartSdk;
2234 if (sdk == null) { 2238 if (sdk == null) {
2235 throw new IllegalArgumentException( 2239 throw new IllegalArgumentException(
2236 "The source factory for an SDK analysis context must have a DartUriRes olver"); 2240 "The source factory for an SDK analysis context must have a DartUriRes olver");
2237 } 2241 }
2238 return new AnalysisCache( 2242 return new AnalysisCache(
2239 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); 2243 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
2240 } 2244 }
2241 } 2245 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/file_system/file_system.dart ('k') | pkg/analyzer/lib/src/generated/bazel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698