| 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.src.refactoring.rename_library; | 5 library services.src.refactoring.rename_library; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/plugin/protocol/protocol.dart'; | |
| 10 import 'package:analysis_server/src/services/correction/status.dart'; | 9 import 'package:analysis_server/src/services/correction/status.dart'; |
| 11 import 'package:analysis_server/src/services/refactoring/naming_conventions.dart
'; | 10 import 'package:analysis_server/src/services/refactoring/naming_conventions.dart
'; |
| 12 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; | 11 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; |
| 13 import 'package:analysis_server/src/services/refactoring/rename.dart'; | 12 import 'package:analysis_server/src/services/refactoring/rename.dart'; |
| 14 import 'package:analysis_server/src/services/search/search_engine.dart'; | 13 import 'package:analysis_server/src/services/search/search_engine.dart'; |
| 15 import 'package:analyzer/dart/element/element.dart'; | 14 import 'package:analyzer/dart/element/element.dart'; |
| 16 | 15 |
| 17 /** | 16 /** |
| 18 * A [Refactoring] for renaming [LibraryElement]s. | 17 * A [Refactoring] for renaming [LibraryElement]s. |
| 19 */ | 18 */ |
| (...skipping 17 matching lines...) Expand all Loading... |
| 37 } | 36 } |
| 38 | 37 |
| 39 @override | 38 @override |
| 40 RefactoringStatus checkNewName() { | 39 RefactoringStatus checkNewName() { |
| 41 RefactoringStatus result = super.checkNewName(); | 40 RefactoringStatus result = super.checkNewName(); |
| 42 result.addStatus(validateLibraryName(newName)); | 41 result.addStatus(validateLibraryName(newName)); |
| 43 return result; | 42 return result; |
| 44 } | 43 } |
| 45 | 44 |
| 46 @override | 45 @override |
| 47 Future<SourceChange> fillChange() { | 46 Future fillChange() { |
| 48 addDeclarationEdit(element); | 47 addDeclarationEdit(element); |
| 49 return searchEngine.searchReferences(element).then(addReferenceEdits); | 48 return searchEngine.searchReferences(element).then(addReferenceEdits); |
| 50 } | 49 } |
| 51 } | 50 } |
| OLD | NEW |