| 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; | 5 library services.src.refactoring.rename; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analysis_services/correction/change.dart'; | 10 import 'package:analysis_server/src/services/correction/change.dart'; |
| 11 import 'package:analysis_services/correction/status.dart'; | 11 import 'package:analysis_server/src/services/correction/status.dart'; |
| 12 import 'package:analysis_services/refactoring/refactoring.dart'; | 12 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; |
| 13 import 'package:analysis_services/search/search_engine.dart'; | 13 import 'package:analysis_server/src/services/search/search_engine.dart'; |
| 14 import 'package:analysis_services/src/correction/source_range.dart'; | 14 import 'package:analysis_server/src/services/correction/source_range.dart'; |
| 15 import 'package:analysis_services/src/refactoring/refactoring.dart'; | 15 import 'package:analysis_server/src/services/refactoring/refactoring_internal.da
rt'; |
| 16 import 'package:analyzer/src/generated/element.dart'; | 16 import 'package:analyzer/src/generated/element.dart'; |
| 17 import 'package:analyzer/src/generated/engine.dart'; | 17 import 'package:analyzer/src/generated/engine.dart'; |
| 18 import 'package:analyzer/src/generated/source.dart'; | 18 import 'package:analyzer/src/generated/source.dart'; |
| 19 | 19 |
| 20 | 20 |
| 21 /** | 21 /** |
| 22 * Returns the [Edit] to replace the given [SearchMatch] reference. | 22 * Returns the [Edit] to replace the given [SearchMatch] reference. |
| 23 */ | 23 */ |
| 24 Edit createReferenceEdit(SourceReference reference, String newText) { | 24 Edit createReferenceEdit(SourceReference reference, String newText) { |
| 25 return new Edit.range(reference.range, newText); | 25 return new Edit.range(reference.range, newText); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 } | 241 } |
| 242 if (other is SourceReference) { | 242 if (other is SourceReference) { |
| 243 return other.file == file && other.range == range; | 243 return other.file == file && other.range == range; |
| 244 } | 244 } |
| 245 return false; | 245 return false; |
| 246 } | 246 } |
| 247 | 247 |
| 248 @override | 248 @override |
| 249 String toString() => '${file}@${range}'; | 249 String toString() => '${file}@${range}'; |
| 250 } | 250 } |
| OLD | NEW |