| 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 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2004 // prepare notice | 2004 // prepare notice |
| 2005 { | 2005 { |
| 2006 ChangeNoticeImpl notice = getNotice(unitSource); | 2006 ChangeNoticeImpl notice = getNotice(unitSource); |
| 2007 notice.resolvedDartUnit = oldUnit; | 2007 notice.resolvedDartUnit = oldUnit; |
| 2008 AnalysisErrorInfo errorInfo = getErrors(unitSource); | 2008 AnalysisErrorInfo errorInfo = getErrors(unitSource); |
| 2009 notice.setErrors(errorInfo.errors, errorInfo.lineInfo); | 2009 notice.setErrors(errorInfo.errors, errorInfo.lineInfo); |
| 2010 } | 2010 } |
| 2011 // schedule | 2011 // schedule |
| 2012 dartWorkManager.unitIncrementallyResolved(librarySource, unitSource); | 2012 dartWorkManager.unitIncrementallyResolved(librarySource, unitSource); |
| 2013 // OK | 2013 // OK |
| 2014 driver.reset(); |
| 2014 return true; | 2015 return true; |
| 2015 }); | 2016 }); |
| 2016 } | 2017 } |
| 2017 } | 2018 } |
| 2018 | 2019 |
| 2019 /** | 2020 /** |
| 2020 * A helper class used to create futures for [AnalysisContextImpl]. | 2021 * A helper class used to create futures for [AnalysisContextImpl]. |
| 2021 * Using a helper class allows us to preserve the generic parameter T. | 2022 * Using a helper class allows us to preserve the generic parameter T. |
| 2022 */ | 2023 */ |
| 2023 class AnalysisFutureHelper<T> { | 2024 class AnalysisFutureHelper<T> { |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2294 } | 2295 } |
| 2295 DartSdk sdk = factory.dartSdk; | 2296 DartSdk sdk = factory.dartSdk; |
| 2296 if (sdk == null) { | 2297 if (sdk == null) { |
| 2297 throw new IllegalArgumentException( | 2298 throw new IllegalArgumentException( |
| 2298 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2299 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
| 2299 } | 2300 } |
| 2300 return new AnalysisCache( | 2301 return new AnalysisCache( |
| 2301 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 2302 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
| 2302 } | 2303 } |
| 2303 } | 2304 } |
| OLD | NEW |