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

Side by Side Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 770333003: First step to resolving simple API changes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | Annotate | Revision Log
OLDNEW
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
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
1140 @override 1160 @override
1141 List<Source> get librarySources => _getSources(SourceKind.LIBRARY); 1161 List<Source> get librarySources => _getSources(SourceKind.LIBRARY);
1142 1162
1143 /** 1163 /**
1144 * Look through the cache for a task that needs to be performed. Return the ta sk that was found, 1164 * Look through the cache for a task that needs to be performed. Return the ta sk that was found,
1145 * or `null` if there is no more work to be done. 1165 * or `null` if there is no more work to be done.
1146 * 1166 *
1147 * @return the next task that needs to be performed 1167 * @return the next task that needs to be performed
1148 */ 1168 */
1149 AnalysisTask get nextAnalysisTask { 1169 AnalysisTask get nextAnalysisTask {
(...skipping 3856 matching lines...) Expand 10 before | Expand all | Expand 10 after
5006 for (Source source in missingSources) { 5026 for (Source source in missingSources) {
5007 buffer.write(" "); 5027 buffer.write(" ");
5008 buffer.writeln(source.fullName); 5028 buffer.writeln(source.fullName);
5009 } 5029 }
5010 _logInformation(buffer.toString()); 5030 _logInformation(buffer.toString());
5011 } 5031 }
5012 return changedSources.length > 0; 5032 return changedSources.length > 0;
5013 } 5033 }
5014 } 5034 }
5015 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
5016 /** 5055 /**
5017 * An `AnalysisTaskResultRecorder` is used by an analysis context to record the 5056 * An `AnalysisTaskResultRecorder` is used by an analysis context to record the
5018 * results of a task. 5057 * results of a task.
5019 */ 5058 */
5020 class AnalysisContextImpl_AnalysisTaskResultRecorder implements 5059 class AnalysisContextImpl_AnalysisTaskResultRecorder implements
5021 AnalysisTaskVisitor<SourceEntry> { 5060 AnalysisTaskVisitor<SourceEntry> {
5022 final AnalysisContextImpl AnalysisContextImpl_this; 5061 final AnalysisContextImpl AnalysisContextImpl_this;
5023 5062
5024 AnalysisContextImpl_AnalysisTaskResultRecorder(this.AnalysisContextImpl_this); 5063 AnalysisContextImpl_AnalysisTaskResultRecorder(this.AnalysisContextImpl_this);
5025 5064
(...skipping 9911 matching lines...) Expand 10 before | Expand all | Expand 10 after
14937 14976
14938 @override 14977 @override
14939 Object visitPolymerTagDartElement(PolymerTagDartElement element) { 14978 Object visitPolymerTagDartElement(PolymerTagDartElement element) {
14940 if (element.name == PolymerHtmlUnitBuilder_this._elementName) { 14979 if (element.name == PolymerHtmlUnitBuilder_this._elementName) {
14941 throw new PolymerHtmlUnitBuilder_FoundTagDartElementError( 14980 throw new PolymerHtmlUnitBuilder_FoundTagDartElementError(
14942 element as PolymerTagDartElementImpl); 14981 element as PolymerTagDartElementImpl);
14943 } 14982 }
14944 return null; 14983 return null;
14945 } 14984 }
14946 } 14985 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698