| 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; |
| 11 import 'package:analysis_server/src/services/correction/status.dart'; | 11 import 'package:analysis_server/src/services/correction/status.dart'; |
| 12 import 'package:analysis_server/src/services/refactoring/convert_getter_to_metho
d.dart'; |
| 12 import 'package:analysis_server/src/services/refactoring/convert_method_to_gette
r.dart'; | 13 import 'package:analysis_server/src/services/refactoring/convert_method_to_gette
r.dart'; |
| 13 import 'package:analysis_server/src/services/refactoring/extract_local.dart'; | 14 import 'package:analysis_server/src/services/refactoring/extract_local.dart'; |
| 14 import 'package:analysis_server/src/services/refactoring/extract_method.dart'; | 15 import 'package:analysis_server/src/services/refactoring/extract_method.dart'; |
| 15 import 'package:analysis_server/src/services/refactoring/inline_local.dart'; | 16 import 'package:analysis_server/src/services/refactoring/inline_local.dart'; |
| 16 import 'package:analysis_server/src/services/refactoring/inline_method.dart'; | 17 import 'package:analysis_server/src/services/refactoring/inline_method.dart'; |
| 17 import 'package:analysis_server/src/services/refactoring/move_file.dart'; | 18 import 'package:analysis_server/src/services/refactoring/move_file.dart'; |
| 18 import 'package:analysis_server/src/services/refactoring/rename_class_member.dar
t'; | 19 import 'package:analysis_server/src/services/refactoring/rename_class_member.dar
t'; |
| 19 import 'package:analysis_server/src/services/refactoring/rename_constructor.dart
'; | 20 import 'package:analysis_server/src/services/refactoring/rename_constructor.dart
'; |
| 20 import 'package:analysis_server/src/services/refactoring/rename_import.dart'; | 21 import 'package:analysis_server/src/services/refactoring/rename_import.dart'; |
| 21 import 'package:analysis_server/src/services/refactoring/rename_label.dart'; | 22 import 'package:analysis_server/src/services/refactoring/rename_label.dart'; |
| 22 import 'package:analysis_server/src/services/refactoring/rename_library.dart'; | 23 import 'package:analysis_server/src/services/refactoring/rename_library.dart'; |
| 23 import 'package:analysis_server/src/services/refactoring/rename_local.dart'; | 24 import 'package:analysis_server/src/services/refactoring/rename_local.dart'; |
| 24 import 'package:analysis_server/src/services/refactoring/rename_unit_member.dart
'; | 25 import 'package:analysis_server/src/services/refactoring/rename_unit_member.dart
'; |
| 25 import 'package:analysis_server/src/services/search/search_engine.dart'; | 26 import 'package:analysis_server/src/services/search/search_engine.dart'; |
| 26 import 'package:analyzer/src/generated/ast.dart'; | 27 import 'package:analyzer/src/generated/ast.dart'; |
| 27 import 'package:analyzer/src/generated/element.dart'; | 28 import 'package:analyzer/src/generated/element.dart'; |
| 28 import 'package:analyzer/src/generated/engine.dart'; | 29 import 'package:analyzer/src/generated/engine.dart'; |
| 29 import 'package:analyzer/src/generated/source.dart'; | 30 import 'package:analyzer/src/generated/source.dart'; |
| 30 import 'package:analysis_server/src/services/refactoring/convert_getter_to_metho
d.dart'; | |
| 31 import 'package:path/path.dart' as pathos; | 31 import 'package:path/path.dart' as pathos; |
| 32 | 32 |
| 33 | 33 |
| 34 /** | 34 /** |
| 35 * [Refactoring] to convert getters into normal [MethodDeclaration]s. | 35 * [Refactoring] to convert getters into normal [MethodDeclaration]s. |
| 36 */ | 36 */ |
| 37 abstract class ConvertGetterToMethodRefactoring implements Refactoring { | 37 abstract class ConvertGetterToMethodRefactoring implements Refactoring { |
| 38 /** | 38 /** |
| 39 * Returns a new [ConvertMethodToGetterRefactoring] instance for converting | 39 * Returns a new [ConvertMethodToGetterRefactoring] instance for converting |
| 40 * [element] and all the corresponding hierarchy elements. | 40 * [element] and all the corresponding hierarchy elements. |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 * Validates that the [newName] is a valid identifier and is appropriate for | 416 * Validates that the [newName] is a valid identifier and is appropriate for |
| 417 * the type of the [Element] being renamed. | 417 * the type of the [Element] being renamed. |
| 418 * | 418 * |
| 419 * It does not perform all the checks (such as checking for conflicts with any | 419 * It does not perform all the checks (such as checking for conflicts with any |
| 420 * existing names in any of the scopes containing the current name), as many | 420 * existing names in any of the scopes containing the current name), as many |
| 421 * of these checkes require search engine. Use [checkFinalConditions] for this | 421 * of these checkes require search engine. Use [checkFinalConditions] for this |
| 422 * level of checking. | 422 * level of checking. |
| 423 */ | 423 */ |
| 424 RefactoringStatus checkNewName(); | 424 RefactoringStatus checkNewName(); |
| 425 } | 425 } |
| OLD | NEW |