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

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

Issue 2540793003: Make 'Inline Method' refactoring work with the new analysis driver. (Closed)
Patch Set: Created 4 years 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
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.refactoring; 5 library services.refactoring;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/protocol/protocol.dart' 9 import 'package:analysis_server/plugin/protocol/protocol.dart'
10 show RefactoringMethodParameter, SourceChange; 10 show RefactoringMethodParameter, SourceChange;
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 242 }
243 243
244 /** 244 /**
245 * [Refactoring] to inline an [ExecutableElement]. 245 * [Refactoring] to inline an [ExecutableElement].
246 */ 246 */
247 abstract class InlineMethodRefactoring implements Refactoring { 247 abstract class InlineMethodRefactoring implements Refactoring {
248 /** 248 /**
249 * Returns a new [InlineMethodRefactoring] instance. 249 * Returns a new [InlineMethodRefactoring] instance.
250 */ 250 */
251 factory InlineMethodRefactoring( 251 factory InlineMethodRefactoring(
252 SearchEngine searchEngine, CompilationUnit unit, int offset) { 252 SearchEngine searchEngine,
253 return new InlineMethodRefactoringImpl(searchEngine, unit, offset); 253 GetResolvedUnitContainingElement getResolvedUnit,
254 CompilationUnit unit,
255 int offset) {
256 return new InlineMethodRefactoringImpl(
257 searchEngine, getResolvedUnit, unit, offset);
254 } 258 }
255 259
256 /** 260 /**
257 * The name of the class enclosing the method being inlined. 261 * The name of the class enclosing the method being inlined.
258 * If not a class member is being inlined, then `null`. 262 * If not a class member is being inlined, then `null`.
259 */ 263 */
260 String get className; 264 String get className;
261 265
262 /** 266 /**
263 * True if the method being inlined should be removed. 267 * True if the method being inlined should be removed.
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 * Validates that the [newName] is a valid identifier and is appropriate for 422 * Validates that the [newName] is a valid identifier and is appropriate for
419 * the type of the [Element] being renamed. 423 * the type of the [Element] being renamed.
420 * 424 *
421 * It does not perform all the checks (such as checking for conflicts with any 425 * It does not perform all the checks (such as checking for conflicts with any
422 * existing names in any of the scopes containing the current name), as many 426 * existing names in any of the scopes containing the current name), as many
423 * of these checkes require search engine. Use [checkFinalConditions] for this 427 * of these checkes require search engine. Use [checkFinalConditions] for this
424 * level of checking. 428 * level of checking.
425 */ 429 */
426 RefactoringStatus checkNewName(); 430 RefactoringStatus checkNewName();
427 } 431 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698