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

Side by Side Diff: pkg/analysis_server/lib/src/services/search/search_engine_internal.dart

Issue 946023003: Fix for searching constructor references. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library services.src.search.search_engine; 5 library services.src.search.search_engine;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/services/index/index.dart'; 9 import 'package:analysis_server/src/services/index/index.dart';
10 import 'package:analysis_server/src/services/search/search_engine.dart'; 10 import 'package:analysis_server/src/services/search/search_engine.dart';
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 IndexConstants.IS_REFERENCED_BY, 122 IndexConstants.IS_REFERENCED_BY,
123 MatchKind.REFERENCE); 123 MatchKind.REFERENCE);
124 return requestor.merge(); 124 return requestor.merge();
125 } 125 }
126 126
127 Future<List<SearchMatch>> 127 Future<List<SearchMatch>>
128 _searchReferences_Constructor(ConstructorElement constructor) { 128 _searchReferences_Constructor(ConstructorElement constructor) {
129 _Requestor requestor = new _Requestor(_index); 129 _Requestor requestor = new _Requestor(_index);
130 requestor.add( 130 requestor.add(
131 constructor, 131 constructor,
132 IndexConstants.NAME_IS_DEFINED_BY,
133 MatchKind.DECLARATION);
134 requestor.add(
135 constructor,
136 IndexConstants.IS_REFERENCED_BY, 132 IndexConstants.IS_REFERENCED_BY,
137 MatchKind.REFERENCE); 133 MatchKind.REFERENCE);
138 return requestor.merge(); 134 return requestor.merge();
139 } 135 }
140 136
141 Future<List<SearchMatch>> 137 Future<List<SearchMatch>>
142 _searchReferences_Field(PropertyInducingElement field) { 138 _searchReferences_Field(PropertyInducingElement field) {
143 PropertyAccessorElement getter = field.getter; 139 PropertyAccessorElement getter = field.getter;
144 PropertyAccessorElement setter = field.setter; 140 PropertyAccessorElement setter = field.setter;
145 _Requestor requestor = new _Requestor(_index); 141 _Requestor requestor = new _Requestor(_index);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 }); 233 });
238 futures.add(matchesFuture); 234 futures.add(matchesFuture);
239 } 235 }
240 236
241 Future<List<SearchMatch>> merge() { 237 Future<List<SearchMatch>> merge() {
242 return Future.wait(futures).then((List<List<SearchMatch>> matchesList) { 238 return Future.wait(futures).then((List<List<SearchMatch>> matchesList) {
243 return matchesList.expand((matches) => matches).toList(); 239 return matchesList.expand((matches) => matches).toList();
244 }); 240 });
245 } 241 }
246 } 242 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698