| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine; | 8 library engine; |
| 9 | 9 |
| 10 import "dart:math" as math; | 10 import "dart:math" as math; |
| (...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1130 if (sourceEntry.kind == SourceKind.LIBRARY && !source.isInSystemLibrary) { | 1130 if (sourceEntry.kind == SourceKind.LIBRARY && !source.isInSystemLibrary) { |
| 1131 // DartEntry dartEntry = (DartEntry) sourceEntry; | 1131 // DartEntry dartEntry = (DartEntry) sourceEntry; |
| 1132 // if (dartEntry.getValue(DartEntry.IS_LAUNCHABLE) && !dartEntry.getVal
ue(DartEntry.IS_CLIENT)) { | 1132 // if (dartEntry.getValue(DartEntry.IS_LAUNCHABLE) && !dartEntry.getVal
ue(DartEntry.IS_CLIENT)) { |
| 1133 sources.add(source); | 1133 sources.add(source); |
| 1134 // } | 1134 // } |
| 1135 } | 1135 } |
| 1136 } | 1136 } |
| 1137 return sources; | 1137 return sources; |
| 1138 } | 1138 } |
| 1139 | 1139 |
| 1140 Element findElementById(int id) { | |
| 1141 _ElementByIdFinder finder = new _ElementByIdFinder(id); | |
| 1142 try { | |
| 1143 MapIterator<Source, SourceEntry> iterator = _cache.iterator(); | |
| 1144 while (iterator.moveNext()) { | |
| 1145 SourceEntry sourceEntry = iterator.value; | |
| 1146 if (sourceEntry.kind == SourceKind.LIBRARY) { | |
| 1147 DartEntry dartEntry = sourceEntry; | |
| 1148 LibraryElement library = dartEntry.getValue(DartEntry.ELEMENT); | |
| 1149 if (library != null) { | |
| 1150 library.accept(finder); | |
| 1151 } | |
| 1152 } | |
| 1153 } | |
| 1154 } on _ElementByIdFinderException catch (e) { | |
| 1155 return finder.result; | |
| 1156 } | |
| 1157 return null; | |
| 1158 } | |
| 1159 | |
| 1160 @override | 1140 @override |
| 1161 List<Source> get librarySources => _getSources(SourceKind.LIBRARY); | 1141 List<Source> get librarySources => _getSources(SourceKind.LIBRARY); |
| 1162 | 1142 |
| 1163 /** | 1143 /** |
| 1164 * Look through the cache for a task that needs to be performed. Return the ta
sk that was found, | 1144 * Look through the cache for a task that needs to be performed. Return the ta
sk that was found, |
| 1165 * or `null` if there is no more work to be done. | 1145 * or `null` if there is no more work to be done. |
| 1166 * | 1146 * |
| 1167 * @return the next task that needs to be performed | 1147 * @return the next task that needs to be performed |
| 1168 */ | 1148 */ |
| 1169 AnalysisTask get nextAnalysisTask { | 1149 AnalysisTask get nextAnalysisTask { |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1692 bool exists(Source source) { | 1672 bool exists(Source source) { |
| 1693 if (source == null) { | 1673 if (source == null) { |
| 1694 return false; | 1674 return false; |
| 1695 } | 1675 } |
| 1696 if (_contentCache.getContents(source) != null) { | 1676 if (_contentCache.getContents(source) != null) { |
| 1697 return true; | 1677 return true; |
| 1698 } | 1678 } |
| 1699 return source.exists(); | 1679 return source.exists(); |
| 1700 } | 1680 } |
| 1701 | 1681 |
| 1682 Element findElementById(int id) { |
| 1683 _ElementByIdFinder finder = new _ElementByIdFinder(id); |
| 1684 try { |
| 1685 MapIterator<Source, SourceEntry> iterator = _cache.iterator(); |
| 1686 while (iterator.moveNext()) { |
| 1687 SourceEntry sourceEntry = iterator.value; |
| 1688 if (sourceEntry.kind == SourceKind.LIBRARY) { |
| 1689 DartEntry dartEntry = sourceEntry; |
| 1690 LibraryElement library = dartEntry.getValue(DartEntry.ELEMENT); |
| 1691 if (library != null) { |
| 1692 library.accept(finder); |
| 1693 } |
| 1694 } |
| 1695 } |
| 1696 } on _ElementByIdFinderException catch (e) { |
| 1697 return finder.result; |
| 1698 } |
| 1699 return null; |
| 1700 } |
| 1701 |
| 1702 @override | 1702 @override |
| 1703 AngularApplication getAngularApplicationWithHtml(Source htmlSource) { | 1703 AngularApplication getAngularApplicationWithHtml(Source htmlSource) { |
| 1704 SourceEntry sourceEntry = getReadableSourceEntryOrNull(htmlSource); | 1704 SourceEntry sourceEntry = getReadableSourceEntryOrNull(htmlSource); |
| 1705 if (sourceEntry is HtmlEntry) { | 1705 if (sourceEntry is HtmlEntry) { |
| 1706 HtmlEntry htmlEntry = sourceEntry; | 1706 HtmlEntry htmlEntry = sourceEntry; |
| 1707 AngularApplication application = | 1707 AngularApplication application = |
| 1708 htmlEntry.getValue(HtmlEntry.ANGULAR_APPLICATION); | 1708 htmlEntry.getValue(HtmlEntry.ANGULAR_APPLICATION); |
| 1709 if (application != null) { | 1709 if (application != null) { |
| 1710 return application; | 1710 return application; |
| 1711 } | 1711 } |
| (...skipping 3314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5026 for (Source source in missingSources) { | 5026 for (Source source in missingSources) { |
| 5027 buffer.write(" "); | 5027 buffer.write(" "); |
| 5028 buffer.writeln(source.fullName); | 5028 buffer.writeln(source.fullName); |
| 5029 } | 5029 } |
| 5030 _logInformation(buffer.toString()); | 5030 _logInformation(buffer.toString()); |
| 5031 } | 5031 } |
| 5032 return changedSources.length > 0; | 5032 return changedSources.length > 0; |
| 5033 } | 5033 } |
| 5034 } | 5034 } |
| 5035 | 5035 |
| 5036 class _ElementByIdFinder extends GeneralizingElementVisitor { | |
| 5037 final int _id; | |
| 5038 Element result; | |
| 5039 | |
| 5040 _ElementByIdFinder(this._id); | |
| 5041 | |
| 5042 @override | |
| 5043 visitElement(Element element) { | |
| 5044 if (element.id == _id) { | |
| 5045 result = element; | |
| 5046 throw new _ElementByIdFinderException(); | |
| 5047 } | |
| 5048 super.visitElement(element); | |
| 5049 } | |
| 5050 } | |
| 5051 | |
| 5052 class _ElementByIdFinderException { | |
| 5053 } | |
| 5054 | |
| 5055 /** | 5036 /** |
| 5056 * An `AnalysisTaskResultRecorder` is used by an analysis context to record the | 5037 * An `AnalysisTaskResultRecorder` is used by an analysis context to record the |
| 5057 * results of a task. | 5038 * results of a task. |
| 5058 */ | 5039 */ |
| 5059 class AnalysisContextImpl_AnalysisTaskResultRecorder implements | 5040 class AnalysisContextImpl_AnalysisTaskResultRecorder implements |
| 5060 AnalysisTaskVisitor<SourceEntry> { | 5041 AnalysisTaskVisitor<SourceEntry> { |
| 5061 final AnalysisContextImpl AnalysisContextImpl_this; | 5042 final AnalysisContextImpl AnalysisContextImpl_this; |
| 5062 | 5043 |
| 5063 AnalysisContextImpl_AnalysisTaskResultRecorder(this.AnalysisContextImpl_this); | 5044 AnalysisContextImpl_AnalysisTaskResultRecorder(this.AnalysisContextImpl_this); |
| 5064 | 5045 |
| (...skipping 4416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9481 _writeStateOn(buffer, "includedParts", INCLUDED_PARTS); | 9462 _writeStateOn(buffer, "includedParts", INCLUDED_PARTS); |
| 9482 _writeStateOn(buffer, "element", ELEMENT); | 9463 _writeStateOn(buffer, "element", ELEMENT); |
| 9483 _writeStateOn(buffer, "publicNamespace", PUBLIC_NAMESPACE); | 9464 _writeStateOn(buffer, "publicNamespace", PUBLIC_NAMESPACE); |
| 9484 _writeStateOn(buffer, "clientServer", IS_CLIENT); | 9465 _writeStateOn(buffer, "clientServer", IS_CLIENT); |
| 9485 _writeStateOn(buffer, "launchable", IS_LAUNCHABLE); | 9466 _writeStateOn(buffer, "launchable", IS_LAUNCHABLE); |
| 9486 _writeStateOn(buffer, "angularErrors", ANGULAR_ERRORS); | 9467 _writeStateOn(buffer, "angularErrors", ANGULAR_ERRORS); |
| 9487 _resolutionState._writeOn(buffer); | 9468 _resolutionState._writeOn(buffer); |
| 9488 } | 9469 } |
| 9489 } | 9470 } |
| 9490 | 9471 |
| 9491 | |
| 9492 /** | 9472 /** |
| 9493 * Instances of the class `DataDescriptor` are immutable constants representing
data that can | 9473 * Instances of the class `DataDescriptor` are immutable constants representing
data that can |
| 9494 * be stored in the cache. | 9474 * be stored in the cache. |
| 9495 */ | 9475 */ |
| 9496 class DataDescriptor<E> { | 9476 class DataDescriptor<E> { |
| 9497 /** | 9477 /** |
| 9498 * The name of the descriptor, used for debugging purposes. | 9478 * The name of the descriptor, used for debugging purposes. |
| 9499 */ | 9479 */ |
| 9500 final String _name; | 9480 final String _name; |
| 9501 | 9481 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9542 if (sourceEntry is DartEntry) { | 9522 if (sourceEntry is DartEntry) { |
| 9543 DartEntry dartEntry = sourceEntry; | 9523 DartEntry dartEntry = sourceEntry; |
| 9544 if (astIsNeeded(dartEntry)) { | 9524 if (astIsNeeded(dartEntry)) { |
| 9545 return RetentionPriority.MEDIUM; | 9525 return RetentionPriority.MEDIUM; |
| 9546 } | 9526 } |
| 9547 } | 9527 } |
| 9548 return RetentionPriority.LOW; | 9528 return RetentionPriority.LOW; |
| 9549 } | 9529 } |
| 9550 } | 9530 } |
| 9551 | 9531 |
| 9532 |
| 9552 /** | 9533 /** |
| 9553 * Recursively visits [HtmlUnit] and every embedded [Expression]. | 9534 * Recursively visits [HtmlUnit] and every embedded [Expression]. |
| 9554 */ | 9535 */ |
| 9555 abstract class ExpressionVisitor extends ht.RecursiveXmlVisitor<Object> { | 9536 abstract class ExpressionVisitor extends ht.RecursiveXmlVisitor<Object> { |
| 9556 /** | 9537 /** |
| 9557 * Visits the given [Expression]s embedded into tag or attribute. | 9538 * Visits the given [Expression]s embedded into tag or attribute. |
| 9558 * | 9539 * |
| 9559 * @param expression the [Expression] to visit, not `null` | 9540 * @param expression the [Expression] to visit, not `null` |
| 9560 */ | 9541 */ |
| 9561 void visitExpression(Expression expression); | 9542 void visitExpression(Expression expression); |
| (...skipping 5398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14960 @override | 14941 @override |
| 14961 Object visitXmlTagNode(ht.XmlTagNode node) { | 14942 Object visitXmlTagNode(ht.XmlTagNode node) { |
| 14962 NgModelProcessor directive = NgModelProcessor.INSTANCE; | 14943 NgModelProcessor directive = NgModelProcessor.INSTANCE; |
| 14963 if (directive.canApply(node)) { | 14944 if (directive.canApply(node)) { |
| 14964 directive._applyTopDeclarations(resolver, node); | 14945 directive._applyTopDeclarations(resolver, node); |
| 14965 } | 14946 } |
| 14966 return super.visitXmlTagNode(node); | 14947 return super.visitXmlTagNode(node); |
| 14967 } | 14948 } |
| 14968 } | 14949 } |
| 14969 | 14950 |
| 14951 class _ElementByIdFinder extends GeneralizingElementVisitor { |
| 14952 final int _id; |
| 14953 Element result; |
| 14954 |
| 14955 _ElementByIdFinder(this._id); |
| 14956 |
| 14957 @override |
| 14958 visitElement(Element element) { |
| 14959 if (element.id == _id) { |
| 14960 result = element; |
| 14961 throw new _ElementByIdFinderException(); |
| 14962 } |
| 14963 super.visitElement(element); |
| 14964 } |
| 14965 } |
| 14966 |
| 14967 class _ElementByIdFinderException { |
| 14968 } |
| 14969 |
| 14970 class _PolymerHtmlUnitBuilder_findTagDartElement extends | 14970 class _PolymerHtmlUnitBuilder_findTagDartElement extends |
| 14971 RecursiveElementVisitor<Object> { | 14971 RecursiveElementVisitor<Object> { |
| 14972 final PolymerHtmlUnitBuilder PolymerHtmlUnitBuilder_this; | 14972 final PolymerHtmlUnitBuilder PolymerHtmlUnitBuilder_this; |
| 14973 | 14973 |
| 14974 _PolymerHtmlUnitBuilder_findTagDartElement(this.PolymerHtmlUnitBuilder_this) | 14974 _PolymerHtmlUnitBuilder_findTagDartElement(this.PolymerHtmlUnitBuilder_this) |
| 14975 : super(); | 14975 : super(); |
| 14976 | 14976 |
| 14977 @override | 14977 @override |
| 14978 Object visitPolymerTagDartElement(PolymerTagDartElement element) { | 14978 Object visitPolymerTagDartElement(PolymerTagDartElement element) { |
| 14979 if (element.name == PolymerHtmlUnitBuilder_this._elementName) { | 14979 if (element.name == PolymerHtmlUnitBuilder_this._elementName) { |
| 14980 throw new PolymerHtmlUnitBuilder_FoundTagDartElementError( | 14980 throw new PolymerHtmlUnitBuilder_FoundTagDartElementError( |
| 14981 element as PolymerTagDartElementImpl); | 14981 element as PolymerTagDartElementImpl); |
| 14982 } | 14982 } |
| 14983 return null; | 14983 return null; |
| 14984 } | 14984 } |
| 14985 } | 14985 } |
| OLD | NEW |