| 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/src/cancelable_future.dart'; | 10 import 'package:analyzer/src/cancelable_future.dart'; |
| (...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 // SourceEntry sourceEntry = getReadableSourceEntryOrNull(htmlSource); | 928 // SourceEntry sourceEntry = getReadableSourceEntryOrNull(htmlSource); |
| 929 // if (sourceEntry is HtmlEntry) { | 929 // if (sourceEntry is HtmlEntry) { |
| 930 // HtmlEntry htmlEntry = sourceEntry; | 930 // HtmlEntry htmlEntry = sourceEntry; |
| 931 // return htmlEntry.getValue(HtmlEntry.RESOLVED_UNIT); | 931 // return htmlEntry.getValue(HtmlEntry.RESOLVED_UNIT); |
| 932 // } | 932 // } |
| 933 return null; | 933 return null; |
| 934 } | 934 } |
| 935 | 935 |
| 936 @override | 936 @override |
| 937 List<Source> getSourcesWithFullName(String path) { | 937 List<Source> getSourcesWithFullName(String path) { |
| 938 List<Source> sources = <Source>[]; | 938 return analysisCache.getSourcesWithFullName(path); |
| 939 for (Source source in _cache.sources) { | |
| 940 if (source.fullName == path) { | |
| 941 sources.add(source); | |
| 942 } | |
| 943 } | |
| 944 return sources; | |
| 945 } | 939 } |
| 946 | 940 |
| 947 @override | 941 @override |
| 948 bool handleContentsChanged( | 942 bool handleContentsChanged( |
| 949 Source source, String originalContents, String newContents, bool notify) { | 943 Source source, String originalContents, String newContents, bool notify) { |
| 950 CacheEntry entry = _cache.get(source); | 944 CacheEntry entry = _cache.get(source); |
| 951 if (entry == null) { | 945 if (entry == null) { |
| 952 return false; | 946 return false; |
| 953 } | 947 } |
| 954 bool changed = newContents != originalContents; | 948 bool changed = newContents != originalContents; |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2012 PendingFuture pendingFuture = | 2006 PendingFuture pendingFuture = |
| 2013 new PendingFuture<T>(_context, target, computeValue); | 2007 new PendingFuture<T>(_context, target, computeValue); |
| 2014 if (!pendingFuture.evaluate(entry)) { | 2008 if (!pendingFuture.evaluate(entry)) { |
| 2015 _context._pendingFutureTargets | 2009 _context._pendingFutureTargets |
| 2016 .putIfAbsent(target, () => <PendingFuture>[]) | 2010 .putIfAbsent(target, () => <PendingFuture>[]) |
| 2017 .add(pendingFuture); | 2011 .add(pendingFuture); |
| 2018 } | 2012 } |
| 2019 return pendingFuture.future; | 2013 return pendingFuture.future; |
| 2020 } | 2014 } |
| 2021 } | 2015 } |
| OLD | NEW |