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 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 Source unitSource, Source librarySource) { | 1148 Source unitSource, Source librarySource) { |
1149 if (!AnalysisEngine.isDartFileName(unitSource.shortName) || | 1149 if (!AnalysisEngine.isDartFileName(unitSource.shortName) || |
1150 !AnalysisEngine.isDartFileName(librarySource.shortName)) { | 1150 !AnalysisEngine.isDartFileName(librarySource.shortName)) { |
1151 return null; | 1151 return null; |
1152 } | 1152 } |
1153 return _computeResult( | 1153 return _computeResult( |
1154 new LibrarySpecificUnit(librarySource, unitSource), RESOLVED_UNIT); | 1154 new LibrarySpecificUnit(librarySource, unitSource), RESOLVED_UNIT); |
1155 } | 1155 } |
1156 | 1156 |
1157 @override | 1157 @override |
| 1158 @deprecated |
1158 ht.HtmlUnit resolveHtmlUnit(Source htmlSource) { | 1159 ht.HtmlUnit resolveHtmlUnit(Source htmlSource) { |
1159 computeHtmlElement(htmlSource); | 1160 computeHtmlElement(htmlSource); |
1160 return parseHtmlUnit(htmlSource); | 1161 throw new UnimplementedError('Not supported in the new task model'); |
1161 } | 1162 } |
1162 | 1163 |
1163 @override | 1164 @override |
1164 void setChangedContents(Source source, String contents, int offset, | 1165 void setChangedContents(Source source, String contents, int offset, |
1165 int oldLength, int newLength) { | 1166 int oldLength, int newLength) { |
1166 if (_contentRangeChanged(source, contents, offset, oldLength, newLength)) { | 1167 if (_contentRangeChanged(source, contents, offset, oldLength, newLength)) { |
1167 _onSourcesChangedController.add(new SourcesChangedEvent.changedRange( | 1168 _onSourcesChangedController.add(new SourcesChangedEvent.changedRange( |
1168 source, contents, offset, oldLength, newLength)); | 1169 source, contents, offset, oldLength, newLength)); |
1169 } | 1170 } |
1170 } | 1171 } |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2007 new PendingFuture<T>(_context, target, computeValue); | 2008 new PendingFuture<T>(_context, target, computeValue); |
2008 if (!pendingFuture.evaluate(entry)) { | 2009 if (!pendingFuture.evaluate(entry)) { |
2009 _context._pendingFutureTargets | 2010 _context._pendingFutureTargets |
2010 .putIfAbsent(target, () => <PendingFuture>[]) | 2011 .putIfAbsent(target, () => <PendingFuture>[]) |
2011 .add(pendingFuture); | 2012 .add(pendingFuture); |
2012 scheduleComputation(); | 2013 scheduleComputation(); |
2013 } | 2014 } |
2014 return pendingFuture.future; | 2015 return pendingFuture.future; |
2015 } | 2016 } |
2016 } | 2017 } |
OLD | NEW |