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; |