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

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

Issue 2183003003: Associate excludes with context data. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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';
(...skipping 16 matching lines...) Expand all
27 import 'package:analyzer/src/generated/resolver.dart'; 27 import 'package:analyzer/src/generated/resolver.dart';
28 import 'package:analyzer/src/generated/sdk.dart' show DartSdk; 28 import 'package:analyzer/src/generated/sdk.dart' show DartSdk;
29 import 'package:analyzer/src/generated/source.dart'; 29 import 'package:analyzer/src/generated/source.dart';
30 import 'package:analyzer/src/generated/testing/ast_factory.dart'; 30 import 'package:analyzer/src/generated/testing/ast_factory.dart';
31 import 'package:analyzer/src/generated/utilities_collection.dart'; 31 import 'package:analyzer/src/generated/utilities_collection.dart';
32 import 'package:analyzer/src/task/dart.dart'; 32 import 'package:analyzer/src/task/dart.dart';
33 import 'package:analyzer/src/task/dart_work_manager.dart'; 33 import 'package:analyzer/src/task/dart_work_manager.dart';
34 import 'package:analyzer/src/task/driver.dart'; 34 import 'package:analyzer/src/task/driver.dart';
35 import 'package:analyzer/src/task/incremental_element_builder.dart'; 35 import 'package:analyzer/src/task/incremental_element_builder.dart';
36 import 'package:analyzer/src/task/manager.dart'; 36 import 'package:analyzer/src/task/manager.dart';
37 import 'package:analyzer/src/task/model.dart';
37 import 'package:analyzer/task/dart.dart'; 38 import 'package:analyzer/task/dart.dart';
38 import 'package:analyzer/task/general.dart'; 39 import 'package:analyzer/task/general.dart';
39 import 'package:analyzer/task/html.dart'; 40 import 'package:analyzer/task/html.dart';
40 import 'package:analyzer/task/model.dart'; 41 import 'package:analyzer/task/model.dart';
41 import 'package:html/dom.dart' show Document; 42 import 'package:html/dom.dart' show Document;
42 43
43 /** 44 /**
45 * The descriptor used to associate exclude patterns with an analysis context in
46 * configuration data.
47 */
48 final ResultDescriptor<List<String>> CONTEXT_EXCLUDES =
scheglov 2016/07/26 17:21:20 ListResultDescriptor<String>
pquitslund 2016/07/26 17:24:15 Done.
49 new ResultDescriptorImpl('context.excludes', const <String>[]);
scheglov 2016/07/26 17:21:20 Currently we use the name of the ResultDescriptor
pquitslund 2016/07/26 17:24:14 Done.
50
51 /**
44 * Type of callback functions used by PendingFuture. Functions of this type 52 * Type of callback functions used by PendingFuture. Functions of this type
45 * should perform a computation based on the data in [entry] and return it. If 53 * should perform a computation based on the data in [entry] and return it. If
46 * the computation can't be performed yet because more analysis is needed, 54 * the computation can't be performed yet because more analysis is needed,
47 * `null` should be returned. 55 * `null` should be returned.
48 * 56 *
49 * The function may also throw an exception, in which case the corresponding 57 * The function may also throw an exception, in which case the corresponding
50 * future will be completed with failure. 58 * future will be completed with failure.
51 * 59 *
52 * Because this function is called while the state of analysis is being updated, 60 * Because this function is called while the state of analysis is being updated,
53 * it should be free of side effects so that it doesn't cause reentrant changes 61 * it should be free of side effects so that it doesn't cause reentrant changes
(...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after
2302 } 2310 }
2303 DartSdk sdk = factory.dartSdk; 2311 DartSdk sdk = factory.dartSdk;
2304 if (sdk == null) { 2312 if (sdk == null) {
2305 throw new IllegalArgumentException( 2313 throw new IllegalArgumentException(
2306 "The source factory for an SDK analysis context must have a DartUriRes olver"); 2314 "The source factory for an SDK analysis context must have a DartUriRes olver");
2307 } 2315 }
2308 return new AnalysisCache( 2316 return new AnalysisCache(
2309 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); 2317 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
2310 } 2318 }
2311 } 2319 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698