| 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 63962d516f6ad47daada1d5f13e2458d016fbc0d..8262efd62b8e99be1a4d53ee99a203b29bfed908 100644
|
| --- a/pkg/analysis_server/lib/src/search/search_domain.dart
|
| +++ b/pkg/analysis_server/lib/src/search/search_domain.dart
|
| @@ -4,8 +4,6 @@
|
|
|
| library search.domain;
|
|
|
| -import 'dart:async';
|
| -
|
| import 'package:analysis_server/src/analysis_server.dart';
|
| import 'package:analysis_server/src/constants.dart';
|
| import 'package:analysis_server/src/protocol.dart' as protocol;
|
| @@ -65,18 +63,15 @@ class SearchDomainHandler implements protocol.RequestHandler {
|
| _sendSearchNotification(searchId, isLast, results);
|
| });
|
| });
|
| - if (elements.isEmpty) {
|
| - new Future.microtask(() {
|
| - _sendSearchNotification(searchId, true, []);
|
| - });
|
| - }
|
| // respond
|
| - protocol.Element element;
|
| - if (elements.isNotEmpty) {
|
| - element = new protocol.Element.fromEngine(elements[0]);
|
| + if (elements.isEmpty) {
|
| + return new protocol.SearchFindElementReferencesResult().toResponse(
|
| + request.id);
|
| + } else {
|
| + protocol.Element element = new protocol.Element.fromEngine(elements[0]);
|
| + return new protocol.SearchFindElementReferencesResult(id: searchId,
|
| + element: element).toResponse(request.id);
|
| }
|
| - return new protocol.SearchFindElementReferencesResult(searchId,
|
| - element: element).toResponse(request.id);
|
| }
|
|
|
| protocol.Response findMemberDeclarations(protocol.Request request) {
|
|
|