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_services/correction/change.dart'; | 9 import 'package:analysis_server/src/services/correction/change.dart'; |
10 import 'package:analysis_services/correction/status.dart'; | 10 import 'package:analysis_server/src/services/correction/status.dart'; |
11 import 'package:analysis_services/refactoring/refactoring.dart'; | 11 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; |
12 import 'package:analysis_services/search/search_engine.dart'; | 12 import 'package:analysis_server/src/services/search/search_engine.dart'; |
13 import 'package:analysis_services/src/refactoring/naming_conventions.dart'; | 13 import 'package:analysis_server/src/services/refactoring/naming_conventions.dart
'; |
14 import 'package:analysis_services/src/refactoring/rename.dart'; | 14 import 'package:analysis_server/src/services/refactoring/rename.dart'; |
15 import 'package:analyzer/src/generated/element.dart'; | 15 import 'package:analyzer/src/generated/element.dart'; |
16 | 16 |
17 | 17 |
18 /** | 18 /** |
19 * A [Refactoring] for renaming [LibraryElement]s. | 19 * A [Refactoring] for renaming [LibraryElement]s. |
20 */ | 20 */ |
21 class RenameLibraryRefactoringImpl extends RenameRefactoringImpl { | 21 class RenameLibraryRefactoringImpl extends RenameRefactoringImpl { |
22 RenameLibraryRefactoringImpl(SearchEngine searchEngine, | 22 RenameLibraryRefactoringImpl(SearchEngine searchEngine, |
23 LibraryElement element) | 23 LibraryElement element) |
24 : super(searchEngine, element); | 24 : super(searchEngine, element); |
(...skipping 27 matching lines...) Expand all Loading... |
52 // update references | 52 // update references |
53 return searchEngine.searchReferences(element).then((refMatches) { | 53 return searchEngine.searchReferences(element).then((refMatches) { |
54 List<SourceReference> references = getSourceReferences(refMatches); | 54 List<SourceReference> references = getSourceReferences(refMatches); |
55 for (SourceReference reference in references) { | 55 for (SourceReference reference in references) { |
56 addReferenceEdit(change, reference); | 56 addReferenceEdit(change, reference); |
57 } | 57 } |
58 return change; | 58 return change; |
59 }); | 59 }); |
60 } | 60 } |
61 } | 61 } |
OLD | NEW |