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

Side by Side Diff: pkg/analysis_server/lib/src/services/refactoring/rename_class_member.dart

Issue 560133003: Rollback https://codereview.chromium.org/575613002 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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.refactoring.rename_class_member; 5 library services.src.refactoring.rename_class_member;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind; 9 import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind;
10 import 'package:analysis_server/src/services/correction/status.dart'; 10 import 'package:analysis_server/src/services/correction/status.dart';
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 }).then((_) => result); 231 }).then((_) => result);
232 } 232 }
233 233
234 /** 234 /**
235 * Fills [elements] with [Element]s to rename. 235 * Fills [elements] with [Element]s to rename.
236 */ 236 */
237 Future _prepareElements() { 237 Future _prepareElements() {
238 if (element is ClassMemberElement) { 238 if (element is ClassMemberElement) {
239 return getHierarchyMembers( 239 return getHierarchyMembers(
240 searchEngine, 240 searchEngine,
241 element, 241 element).then((Set<Element> elements) {
242 false).then((Set<Element> elements) {
243 this.elements = elements; 242 this.elements = elements;
244 }); 243 });
245 } else { 244 } else {
246 elements = new Set.from([element]); 245 elements = new Set.from([element]);
247 return new Future.value(); 246 return new Future.value();
248 } 247 }
249 } 248 }
250 249
251 /** 250 /**
252 * Fills [references] with all references to [elements]. 251 * Fills [references] with all references to [elements].
253 */ 252 */
254 Future _prepareReferences() { 253 Future _prepareReferences() {
255 if (!isRename) { 254 if (!isRename) {
256 return new Future.value(); 255 return new Future.value();
257 } 256 }
258 return _prepareElements().then((_) { 257 return _prepareElements().then((_) {
259 return Future.forEach(elements, (Element element) { 258 return Future.forEach(elements, (Element element) {
260 return searchEngine.searchReferences(element).then((references) { 259 return searchEngine.searchReferences(element).then((references) {
261 this.references.addAll(references); 260 this.references.addAll(references);
262 }); 261 });
263 }); 262 });
264 }); 263 });
265 } 264 }
266 } 265 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/search/element_references.dart ('k') | pkg/analysis_server/lib/src/services/search/hierarchy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698