| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/services/correction/status.dart'; | 7 import 'package:analysis_server/src/services/correction/status.dart'; |
| 8 import 'package:analysis_server/src/services/refactoring/convert_getter_to_metho
d.dart'; | 8 import 'package:analysis_server/src/services/refactoring/convert_getter_to_metho
d.dart'; |
| 9 import 'package:analysis_server/src/services/refactoring/convert_method_to_gette
r.dart'; | 9 import 'package:analysis_server/src/services/refactoring/convert_method_to_gette
r.dart'; |
| 10 import 'package:analysis_server/src/services/refactoring/extract_local.dart'; | 10 import 'package:analysis_server/src/services/refactoring/extract_local.dart'; |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 element = (element as PropertyAccessorElement).variable; | 356 element = (element as PropertyAccessorElement).variable; |
| 357 } | 357 } |
| 358 if (element.enclosingElement is CompilationUnitElement) { | 358 if (element.enclosingElement is CompilationUnitElement) { |
| 359 return new RenameUnitMemberRefactoringImpl(searchEngine, element); | 359 return new RenameUnitMemberRefactoringImpl(searchEngine, element); |
| 360 } | 360 } |
| 361 if (element is ConstructorElement) { | 361 if (element is ConstructorElement) { |
| 362 return new RenameConstructorRefactoringImpl( | 362 return new RenameConstructorRefactoringImpl( |
| 363 searchEngine, astProvider, element); | 363 searchEngine, astProvider, element); |
| 364 } | 364 } |
| 365 if (element is ImportElement) { | 365 if (element is ImportElement) { |
| 366 return new RenameImportRefactoringImpl(searchEngine, element); | 366 return new RenameImportRefactoringImpl( |
| 367 searchEngine, astProvider, element); |
| 367 } | 368 } |
| 368 if (element is LabelElement) { | 369 if (element is LabelElement) { |
| 369 return new RenameLabelRefactoringImpl(searchEngine, element); | 370 return new RenameLabelRefactoringImpl(searchEngine, element); |
| 370 } | 371 } |
| 371 if (element is LibraryElement) { | 372 if (element is LibraryElement) { |
| 372 return new RenameLibraryRefactoringImpl(searchEngine, element); | 373 return new RenameLibraryRefactoringImpl(searchEngine, element); |
| 373 } | 374 } |
| 374 if (element is LocalElement) { | 375 if (element is LocalElement) { |
| 375 return new RenameLocalRefactoringImpl(searchEngine, astProvider, element); | 376 return new RenameLocalRefactoringImpl(searchEngine, astProvider, element); |
| 376 } | 377 } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 _map[unitElement] = unit; | 435 _map[unitElement] = unit; |
| 435 } | 436 } |
| 436 return unit; | 437 return unit; |
| 437 } | 438 } |
| 438 | 439 |
| 439 CompilationUnitElement getUnitElement(Element element) { | 440 CompilationUnitElement getUnitElement(Element element) { |
| 440 return element.getAncestor((e) => e is CompilationUnitElement) | 441 return element.getAncestor((e) => e is CompilationUnitElement) |
| 441 as CompilationUnitElement; | 442 as CompilationUnitElement; |
| 442 } | 443 } |
| 443 } | 444 } |
| OLD | NEW |