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

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

Issue 949623005: Field references in field format parameter declarations and initializers mean writing. (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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 return requestor.merge(); 134 return requestor.merge();
135 } 135 }
136 136
137 Future<List<SearchMatch>> 137 Future<List<SearchMatch>>
138 _searchReferences_Field(PropertyInducingElement field) { 138 _searchReferences_Field(PropertyInducingElement field) {
139 PropertyAccessorElement getter = field.getter; 139 PropertyAccessorElement getter = field.getter;
140 PropertyAccessorElement setter = field.setter; 140 PropertyAccessorElement setter = field.setter;
141 _Requestor requestor = new _Requestor(_index); 141 _Requestor requestor = new _Requestor(_index);
142 // field itself 142 // field itself
143 requestor.add(field, IndexConstants.IS_REFERENCED_BY, MatchKind.REFERENCE); 143 requestor.add(field, IndexConstants.IS_REFERENCED_BY, MatchKind.REFERENCE);
144 requestor.add(field, IndexConstants.IS_WRITTEN_BY, MatchKind.WRITE);
144 // getter 145 // getter
145 if (getter != null) { 146 if (getter != null) {
146 requestor.add(getter, IndexConstants.IS_REFERENCED_BY, MatchKind.READ); 147 requestor.add(getter, IndexConstants.IS_REFERENCED_BY, MatchKind.READ);
147 requestor.add(getter, IndexConstants.IS_INVOKED_BY, MatchKind.INVOCATION); 148 requestor.add(getter, IndexConstants.IS_INVOKED_BY, MatchKind.INVOCATION);
148 } 149 }
149 // setter 150 // setter
150 if (setter != null) { 151 if (setter != null) {
151 requestor.add(setter, IndexConstants.IS_REFERENCED_BY, MatchKind.WRITE); 152 requestor.add(setter, IndexConstants.IS_REFERENCED_BY, MatchKind.WRITE);
152 } 153 }
153 // done 154 // done
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 }); 234 });
234 futures.add(matchesFuture); 235 futures.add(matchesFuture);
235 } 236 }
236 237
237 Future<List<SearchMatch>> merge() { 238 Future<List<SearchMatch>> merge() {
238 return Future.wait(futures).then((List<List<SearchMatch>> matchesList) { 239 return Future.wait(futures).then((List<List<SearchMatch>> matchesList) {
239 return matchesList.expand((matches) => matches).toList(); 240 return matchesList.expand((matches) => matches).toList();
240 }); 241 });
241 } 242 }
242 } 243 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698