| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 | 181 |
| 182 /** | 182 /** |
| 183 * [Refactoring] to inline a local [VariableElement]. | 183 * [Refactoring] to inline a local [VariableElement]. |
| 184 */ | 184 */ |
| 185 abstract class InlineLocalRefactoring implements Refactoring { | 185 abstract class InlineLocalRefactoring implements Refactoring { |
| 186 /** | 186 /** |
| 187 * Returns a new [InlineLocalRefactoring] instance. | 187 * Returns a new [InlineLocalRefactoring] instance. |
| 188 */ | 188 */ |
| 189 factory InlineLocalRefactoring(SearchEngine searchEngine, | 189 factory InlineLocalRefactoring(SearchEngine searchEngine, |
| 190 CompilationUnit unit, LocalVariableElement element) { | 190 CompilationUnit unit, int offset) { |
| 191 return new InlineLocalRefactoringImpl(searchEngine, unit, element); | 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 } | 198 } |
| 199 | 199 |
| 200 | 200 |
| 201 /** | 201 /** |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 * Validates that the [newName] is a valid identifier and is appropriate for | 325 * Validates that the [newName] is a valid identifier and is appropriate for |
| 326 * the type of the [Element] being renamed. | 326 * the type of the [Element] being renamed. |
| 327 * | 327 * |
| 328 * It does not perform all the checks (such as checking for conflicts with any | 328 * It does not perform all the checks (such as checking for conflicts with any |
| 329 * existing names in any of the scopes containing the current name), as many | 329 * existing names in any of the scopes containing the current name), as many |
| 330 * of these checkes require search engine. Use [checkFinalConditions] for this | 330 * of these checkes require search engine. Use [checkFinalConditions] for this |
| 331 * level of checking. | 331 * level of checking. |
| 332 */ | 332 */ |
| 333 RefactoringStatus checkNewName(); | 333 RefactoringStatus checkNewName(); |
| 334 } | 334 } |
| OLD | NEW |