| 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 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 @override | 1167 @override |
| 1168 Document parseHtmlDocument(Source source) { | 1168 Document parseHtmlDocument(Source source) { |
| 1169 if (!AnalysisEngine.isHtmlFileName(source.shortName)) { | 1169 if (!AnalysisEngine.isHtmlFileName(source.shortName)) { |
| 1170 return null; | 1170 return null; |
| 1171 } | 1171 } |
| 1172 return computeResult(source, HTML_DOCUMENT); | 1172 return computeResult(source, HTML_DOCUMENT); |
| 1173 } | 1173 } |
| 1174 | 1174 |
| 1175 @override | 1175 @override |
| 1176 AnalysisResult performAnalysisTask() { | 1176 AnalysisResult performAnalysisTask() { |
| 1177 return PerformanceStatistics.performAnalysis.makeCurrentWhile(() { | 1177 return PerformanceStatistics.analysis.makeCurrentWhile(() { |
| 1178 _evaluatePendingFutures(); | 1178 _evaluatePendingFutures(); |
| 1179 bool done = !driver.performAnalysisTask(); | 1179 bool done = !driver.performAnalysisTask(); |
| 1180 List<ChangeNotice> notices = _getChangeNotices(done); | 1180 List<ChangeNotice> notices = _getChangeNotices(done); |
| 1181 if (notices != null) { | 1181 if (notices != null) { |
| 1182 int noticeCount = notices.length; | 1182 int noticeCount = notices.length; |
| 1183 for (int i = 0; i < noticeCount; i++) { | 1183 for (int i = 0; i < noticeCount; i++) { |
| 1184 ChangeNotice notice = notices[i]; | 1184 ChangeNotice notice = notices[i]; |
| 1185 _notifyErrors(notice.source, notice.errors, notice.lineInfo); | 1185 _notifyErrors(notice.source, notice.errors, notice.lineInfo); |
| 1186 } | 1186 } |
| 1187 } | 1187 } |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2110 } | 2110 } |
| 2111 DartSdk sdk = factory.dartSdk; | 2111 DartSdk sdk = factory.dartSdk; |
| 2112 if (sdk == null) { | 2112 if (sdk == null) { |
| 2113 throw new ArgumentError( | 2113 throw new ArgumentError( |
| 2114 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2114 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
| 2115 } | 2115 } |
| 2116 return new AnalysisCache( | 2116 return new AnalysisCache( |
| 2117 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 2117 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
| 2118 } | 2118 } |
| 2119 } | 2119 } |
| OLD | NEW |