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

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

Issue 2249833002: Reset analysis driver after incremental changes. (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
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698