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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/search.dart

Issue 2521363003: Implement SearchEngine for the new driver. (Closed)
Patch Set: Created 4 years, 1 month 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/analysis_server/lib/src/services/search/search_engine_internal2.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/dart/analysis/search.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/search.dart b/pkg/analyzer/lib/src/dart/analysis/search.dart
index 1dfe7b3600bfc871370795e51bb8a8d6bc4a4cd4..3bdcdd17b10ccf1ac023c837c8c909c4153f5d1e 100644
--- a/pkg/analyzer/lib/src/dart/analysis/search.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/search.dart
@@ -39,6 +39,9 @@ class Search {
Future<List<SearchResult>> _searchReferences_Local(
Element element, bool isRootNode(AstNode n)) async {
String path = element.source.fullName;
+ if (!_driver.addedFiles.contains(path)) {
+ return const <SearchResult>[];
+ }
// Prepare the unit.
AnalysisResult analysisResult = await _driver.getResult(path);
« no previous file with comments | « pkg/analysis_server/lib/src/services/search/search_engine_internal2.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698