| 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/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 AnalysisOptions get analysisOptions => _options; | 263 AnalysisOptions get analysisOptions => _options; |
| 264 | 264 |
| 265 @override | 265 @override |
| 266 void set analysisOptions(AnalysisOptions options) { | 266 void set analysisOptions(AnalysisOptions options) { |
| 267 bool needsRecompute = this._options.analyzeFunctionBodiesPredicate != | 267 bool needsRecompute = this._options.analyzeFunctionBodiesPredicate != |
| 268 options.analyzeFunctionBodiesPredicate || | 268 options.analyzeFunctionBodiesPredicate || |
| 269 this._options.generateImplicitErrors != | 269 this._options.generateImplicitErrors != |
| 270 options.generateImplicitErrors || | 270 options.generateImplicitErrors || |
| 271 this._options.generateSdkErrors != options.generateSdkErrors || | 271 this._options.generateSdkErrors != options.generateSdkErrors || |
| 272 this._options.dart2jsHint != options.dart2jsHint || | 272 this._options.dart2jsHint != options.dart2jsHint || |
| 273 _notEqual( |
| 274 this._options.enabledPluginNames, options.enabledPluginNames) || |
| 273 _notEqual(this._options.errorProcessors, options.errorProcessors) || | 275 _notEqual(this._options.errorProcessors, options.errorProcessors) || |
| 274 _notEqual(this._options.excludePatterns, options.excludePatterns) || | 276 _notEqual(this._options.excludePatterns, options.excludePatterns) || |
| 275 (this._options.hint && !options.hint) || | 277 (this._options.hint && !options.hint) || |
| 276 (this._options.lint && !options.lint) || | 278 (this._options.lint && !options.lint) || |
| 277 _notEqual(this._options.lintRules, options.lintRules) || | 279 _notEqual(this._options.lintRules, options.lintRules) || |
| 278 this._options.preserveComments != options.preserveComments || | 280 this._options.preserveComments != options.preserveComments || |
| 279 this._options.strongMode != options.strongMode || | 281 this._options.strongMode != options.strongMode || |
| 280 this._options.enableAssertInitializer != | 282 this._options.enableAssertInitializer != |
| 281 options.enableAssertInitializer || | 283 options.enableAssertInitializer || |
| 282 this._options.enableLazyAssignmentOperators != | 284 this._options.enableLazyAssignmentOperators != |
| (...skipping 21 matching lines...) Expand all Loading... |
| 304 options.analyzeFunctionBodiesPredicate; | 306 options.analyzeFunctionBodiesPredicate; |
| 305 this._options.generateImplicitErrors = options.generateImplicitErrors; | 307 this._options.generateImplicitErrors = options.generateImplicitErrors; |
| 306 this._options.generateSdkErrors = options.generateSdkErrors; | 308 this._options.generateSdkErrors = options.generateSdkErrors; |
| 307 this._options.dart2jsHint = options.dart2jsHint; | 309 this._options.dart2jsHint = options.dart2jsHint; |
| 308 this._options.enableAssertInitializer = options.enableAssertInitializer; | 310 this._options.enableAssertInitializer = options.enableAssertInitializer; |
| 309 this._options.enableStrictCallChecks = options.enableStrictCallChecks; | 311 this._options.enableStrictCallChecks = options.enableStrictCallChecks; |
| 310 this._options.enableLazyAssignmentOperators = | 312 this._options.enableLazyAssignmentOperators = |
| 311 options.enableLazyAssignmentOperators; | 313 options.enableLazyAssignmentOperators; |
| 312 this._options.enableSuperMixins = options.enableSuperMixins; | 314 this._options.enableSuperMixins = options.enableSuperMixins; |
| 313 this._options.enableTiming = options.enableTiming; | 315 this._options.enableTiming = options.enableTiming; |
| 316 this._options.enabledPluginNames = options.enabledPluginNames; |
| 314 this._options.errorProcessors = options.errorProcessors; | 317 this._options.errorProcessors = options.errorProcessors; |
| 315 this._options.excludePatterns = options.excludePatterns; | 318 this._options.excludePatterns = options.excludePatterns; |
| 316 this._options.hint = options.hint; | 319 this._options.hint = options.hint; |
| 317 this._options.lint = options.lint; | 320 this._options.lint = options.lint; |
| 318 this._options.lintRules = options.lintRules; | 321 this._options.lintRules = options.lintRules; |
| 319 this._options.preserveComments = options.preserveComments; | 322 this._options.preserveComments = options.preserveComments; |
| 320 if (this._options.strongMode != options.strongMode) { | 323 if (this._options.strongMode != options.strongMode) { |
| 321 _typeSystem = null; | 324 _typeSystem = null; |
| 322 } | 325 } |
| 323 this._options.strongMode = options.strongMode; | 326 this._options.strongMode = options.strongMode; |
| (...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2109 } | 2112 } |
| 2110 DartSdk sdk = factory.dartSdk; | 2113 DartSdk sdk = factory.dartSdk; |
| 2111 if (sdk == null) { | 2114 if (sdk == null) { |
| 2112 throw new ArgumentError( | 2115 throw new ArgumentError( |
| 2113 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2116 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
| 2114 } | 2117 } |
| 2115 return new AnalysisCache( | 2118 return new AnalysisCache( |
| 2116 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 2119 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
| 2117 } | 2120 } |
| 2118 } | 2121 } |
| OLD | NEW |