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

Unified Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 1132623002: Remove unused AnalysisContextImpl.findElementById(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/engine.dart
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 316182b5feb2d6223f85708d286cacee207c0028..704f20c1e2ad45a4c0d93bbcbc8ce74d9766ed16 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -1796,26 +1796,6 @@ class AnalysisContextImpl implements InternalAnalysisContext {
return source.exists();
}
- Element findElementById(int id) {
- _ElementByIdFinder finder = new _ElementByIdFinder(id);
- try {
- MapIterator<Source, SourceEntry> iterator = _cache.iterator();
- while (iterator.moveNext()) {
- SourceEntry sourceEntry = iterator.value;
- if (sourceEntry.kind == SourceKind.LIBRARY) {
- DartEntry dartEntry = sourceEntry;
- LibraryElement library = dartEntry.getValue(DartEntry.ELEMENT);
- if (library != null) {
- library.accept(finder);
- }
- }
- }
- } on _ElementByIdFinderException {
- return finder.result;
- }
- return null;
- }
-
@override
cache.CacheEntry getCacheEntry(AnalysisTarget target) {
return null;
@@ -11687,21 +11667,3 @@ class _AnalysisFutureHelper<T> {
return pendingFuture.future;
}
}
-
-class _ElementByIdFinder extends GeneralizingElementVisitor {
- final int _id;
- Element result;
-
- _ElementByIdFinder(this._id);
-
- @override
- visitElement(Element element) {
- if (element.id == _id) {
- result = element;
- throw new _ElementByIdFinderException();
- }
- super.visitElement(element);
- }
-}
-
-class _ElementByIdFinderException {}
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698