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

Side by Side Diff: pkg/analysis_services/lib/search/hierarchy.dart

Issue 465733002: 'Rename Local Variable' refactoring implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library services.hierarchy; 8 library services.hierarchy;
9 9
10 import 'dart:async'; 10 import 'dart:async';
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 for (InterfaceType intf in current.interfaces) { 192 for (InterfaceType intf in current.interfaces) {
193 queue.add(intf.element); 193 queue.add(intf.element);
194 } 194 }
195 } 195 }
196 // we don't need "seed" itself 196 // we don't need "seed" itself
197 result.remove(seed); 197 result.remove(seed);
198 return result; 198 return result;
199 } 199 }
200 200
201 201
202 /**
203 * If the given [element] is a synthetic [PropertyAccessorElement] returns
204 * its variable, otherwise returns [element].
205 */
206 Element getSyntheticAccessorVariable(Element element) {
207 if (element is PropertyAccessorElement) {
208 if (element.isSynthetic) {
209 return element.variable;
210 }
211 }
212 return element;
213 }
214
215
202 typedef void _ElementProcessor(Element element); 216 typedef void _ElementProcessor(Element element);
203 217
204 /** 218 /**
205 * A [GeneralizingElementVisitor] adapter for [_ElementProcessor]. 219 * A [GeneralizingElementVisitor] adapter for [_ElementProcessor].
206 */ 220 */
207 class _ElementVisitorAdapter extends GeneralizingElementVisitor { 221 class _ElementVisitorAdapter extends GeneralizingElementVisitor {
208 final _ElementProcessor processor; 222 final _ElementProcessor processor;
209 223
210 _ElementVisitorAdapter(this.processor); 224 _ElementVisitorAdapter(this.processor);
211 225
212 @override 226 @override
213 void visitElement(Element element) { 227 void visitElement(Element element) {
214 processor(element); 228 processor(element);
215 } 229 }
216 } 230 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698