| OLD | NEW |
| 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/src/protocol.dart' show | 9 import 'package:analysis_server/src/protocol.dart' show |
| 10 RefactoringMethodParameter, SourceChange; | 10 RefactoringMethodParameter, SourceChange; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 */ | 188 */ |
| 189 factory InlineLocalRefactoring(SearchEngine searchEngine, | 189 factory InlineLocalRefactoring(SearchEngine searchEngine, |
| 190 CompilationUnit unit, int offset) { | 190 CompilationUnit unit, int offset) { |
| 191 return new InlineLocalRefactoringImpl(searchEngine, unit, offset); | 191 return new InlineLocalRefactoringImpl(searchEngine, unit, offset); |
| 192 } | 192 } |
| 193 | 193 |
| 194 /** | 194 /** |
| 195 * Returns the number of references to the [VariableElement]. | 195 * Returns the number of references to the [VariableElement]. |
| 196 */ | 196 */ |
| 197 int get referenceCount; | 197 int get referenceCount; |
| 198 |
| 199 /** |
| 200 * Returns the name of the variable being inlined. |
| 201 */ |
| 202 String get variableName; |
| 198 } | 203 } |
| 199 | 204 |
| 200 | 205 |
| 201 /** | 206 /** |
| 202 * [Refactoring] to inline an [ExecutableElement]. | 207 * [Refactoring] to inline an [ExecutableElement]. |
| 203 */ | 208 */ |
| 204 abstract class InlineMethodRefactoring implements Refactoring { | 209 abstract class InlineMethodRefactoring implements Refactoring { |
| 205 /** | 210 /** |
| 206 * Returns a new [InlineMethodRefactoring] instance. | 211 * Returns a new [InlineMethodRefactoring] instance. |
| 207 */ | 212 */ |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 * Validates that the [newName] is a valid identifier and is appropriate for | 336 * Validates that the [newName] is a valid identifier and is appropriate for |
| 332 * the type of the [Element] being renamed. | 337 * the type of the [Element] being renamed. |
| 333 * | 338 * |
| 334 * It does not perform all the checks (such as checking for conflicts with any | 339 * It does not perform all the checks (such as checking for conflicts with any |
| 335 * existing names in any of the scopes containing the current name), as many | 340 * existing names in any of the scopes containing the current name), as many |
| 336 * of these checkes require search engine. Use [checkFinalConditions] for this | 341 * of these checkes require search engine. Use [checkFinalConditions] for this |
| 337 * level of checking. | 342 * level of checking. |
| 338 */ | 343 */ |
| 339 RefactoringStatus checkNewName(); | 344 RefactoringStatus checkNewName(); |
| 340 } | 345 } |
| OLD | NEW |