OLD | NEW |
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/instrumentation/instrumentation.dart'; | 10 import 'package:analyzer/instrumentation/instrumentation.dart'; |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 bool needsRecompute = this._options.analyzeFunctionBodiesPredicate != | 260 bool needsRecompute = this._options.analyzeFunctionBodiesPredicate != |
261 options.analyzeFunctionBodiesPredicate || | 261 options.analyzeFunctionBodiesPredicate || |
262 this._options.generateImplicitErrors != | 262 this._options.generateImplicitErrors != |
263 options.generateImplicitErrors || | 263 options.generateImplicitErrors || |
264 this._options.generateSdkErrors != options.generateSdkErrors || | 264 this._options.generateSdkErrors != options.generateSdkErrors || |
265 this._options.dart2jsHint != options.dart2jsHint || | 265 this._options.dart2jsHint != options.dart2jsHint || |
266 (this._options.hint && !options.hint) || | 266 (this._options.hint && !options.hint) || |
267 (this._options.lint && !options.lint) || | 267 (this._options.lint && !options.lint) || |
268 this._options.preserveComments != options.preserveComments || | 268 this._options.preserveComments != options.preserveComments || |
269 this._options.strongMode != options.strongMode || | 269 this._options.strongMode != options.strongMode || |
| 270 ((options is AnalysisOptionsImpl) |
| 271 ? this._options.strongModeHints != options.strongModeHints |
| 272 : false) || |
270 this._options.enableStrictCallChecks != | 273 this._options.enableStrictCallChecks != |
271 options.enableStrictCallChecks || | 274 options.enableStrictCallChecks || |
272 this._options.enableGenericMethods != options.enableGenericMethods || | 275 this._options.enableGenericMethods != options.enableGenericMethods || |
273 this._options.enableSuperMixins != options.enableSuperMixins; | 276 this._options.enableSuperMixins != options.enableSuperMixins; |
274 int cacheSize = options.cacheSize; | 277 int cacheSize = options.cacheSize; |
275 if (this._options.cacheSize != cacheSize) { | 278 if (this._options.cacheSize != cacheSize) { |
276 this._options.cacheSize = cacheSize; | 279 this._options.cacheSize = cacheSize; |
277 } | 280 } |
278 this._options.analyzeFunctionBodiesPredicate = | 281 this._options.analyzeFunctionBodiesPredicate = |
279 options.analyzeFunctionBodiesPredicate; | 282 options.analyzeFunctionBodiesPredicate; |
280 this._options.generateImplicitErrors = options.generateImplicitErrors; | 283 this._options.generateImplicitErrors = options.generateImplicitErrors; |
281 this._options.generateSdkErrors = options.generateSdkErrors; | 284 this._options.generateSdkErrors = options.generateSdkErrors; |
282 this._options.dart2jsHint = options.dart2jsHint; | 285 this._options.dart2jsHint = options.dart2jsHint; |
283 this._options.enableGenericMethods = options.enableGenericMethods; | 286 this._options.enableGenericMethods = options.enableGenericMethods; |
284 this._options.enableStrictCallChecks = options.enableStrictCallChecks; | 287 this._options.enableStrictCallChecks = options.enableStrictCallChecks; |
285 this._options.enableSuperMixins = options.enableSuperMixins; | 288 this._options.enableSuperMixins = options.enableSuperMixins; |
286 this._options.hint = options.hint; | 289 this._options.hint = options.hint; |
287 this._options.incremental = options.incremental; | 290 this._options.incremental = options.incremental; |
288 this._options.incrementalApi = options.incrementalApi; | 291 this._options.incrementalApi = options.incrementalApi; |
289 this._options.incrementalValidation = options.incrementalValidation; | 292 this._options.incrementalValidation = options.incrementalValidation; |
290 this._options.lint = options.lint; | 293 this._options.lint = options.lint; |
291 this._options.preserveComments = options.preserveComments; | 294 this._options.preserveComments = options.preserveComments; |
292 this._options.strongMode = options.strongMode; | 295 this._options.strongMode = options.strongMode; |
| 296 if (options is AnalysisOptionsImpl) { |
| 297 this._options.strongModeHints = options.strongModeHints; |
| 298 } |
293 if (needsRecompute) { | 299 if (needsRecompute) { |
294 for (WorkManager workManager in workManagers) { | 300 for (WorkManager workManager in workManagers) { |
295 workManager.onAnalysisOptionsChanged(); | 301 workManager.onAnalysisOptionsChanged(); |
296 } | 302 } |
297 } | 303 } |
298 } | 304 } |
299 | 305 |
300 @override | 306 @override |
301 void set analysisPriorityOrder(List<Source> sources) { | 307 void set analysisPriorityOrder(List<Source> sources) { |
302 if (sources == null || sources.isEmpty) { | 308 if (sources == null || sources.isEmpty) { |
(...skipping 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2156 DartSdk sdk = factory.dartSdk; | 2162 DartSdk sdk = factory.dartSdk; |
2157 if (sdk == null) { | 2163 if (sdk == null) { |
2158 throw new IllegalArgumentException( | 2164 throw new IllegalArgumentException( |
2159 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2165 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
2160 } | 2166 } |
2161 return new AnalysisCache(<CachePartition>[ | 2167 return new AnalysisCache(<CachePartition>[ |
2162 AnalysisEngine.instance.partitionManager_new.forSdk(sdk) | 2168 AnalysisEngine.instance.partitionManager_new.forSdk(sdk) |
2163 ]); | 2169 ]); |
2164 } | 2170 } |
2165 } | 2171 } |
OLD | NEW |