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

Unified Diff: pkg/analysis_server/lib/src/search/search_domain.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
Index: pkg/analysis_server/lib/src/search/search_domain.dart
diff --git a/pkg/analysis_server/lib/src/search/search_domain.dart b/pkg/analysis_server/lib/src/search/search_domain.dart
index d75ea96efbddb38c939ea46f8aa3ec99b065870e..765598708a8532129a7ec3614e578b85d884960a 100644
--- a/pkg/analysis_server/lib/src/search/search_domain.dart
+++ b/pkg/analysis_server/lib/src/search/search_domain.dart
@@ -49,20 +49,13 @@ class SearchDomainHandler implements protocol.RequestHandler {
searchEngine = server.searchEngine;
Future findElementReferences(protocol.Request request) async {
- if (server.options.enableNewAnalysisDriver) {
- // TODO(scheglov) implement for the new analysis driver
- String searchId = (_nextSearchId++).toString();
- var result = new protocol.SearchFindElementReferencesResult();
- result.id = searchId;
- _sendSearchResult(request, result);
- _sendSearchNotification(searchId, true, <protocol.SearchResult>[]);
- return;
- }
var params =
new protocol.SearchFindElementReferencesParams.fromRequest(request);
String file = params.file;
- await server.onAnalysisComplete;
// prepare element
+ if (!server.options.enableNewAnalysisDriver) {
+ await server.onAnalysisComplete;
+ }
Element element = await server.getElementAtOffset(file, params.offset);
if (element is ImportElement) {
element = (element as ImportElement).prefix;

Powered by Google App Engine
This is Rietveld 408576698