| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 element = (element as PropertyAccessorElement).variable; | 383 element = (element as PropertyAccessorElement).variable; |
| 384 } | 384 } |
| 385 if (element.enclosingElement is CompilationUnitElement) { | 385 if (element.enclosingElement is CompilationUnitElement) { |
| 386 return new RenameUnitMemberRefactoringImpl(searchEngine, element); | 386 return new RenameUnitMemberRefactoringImpl(searchEngine, element); |
| 387 } | 387 } |
| 388 if (element is ConstructorElement) { | 388 if (element is ConstructorElement) { |
| 389 return new RenameConstructorRefactoringImpl( | 389 return new RenameConstructorRefactoringImpl( |
| 390 searchEngine, astProvider, element); | 390 searchEngine, astProvider, element); |
| 391 } | 391 } |
| 392 if (element is ImportElement) { | 392 if (element is ImportElement) { |
| 393 return new RenameImportRefactoringImpl(searchEngine, element); | 393 return new RenameImportRefactoringImpl( |
| 394 searchEngine, astProvider, element); |
| 394 } | 395 } |
| 395 if (element is LabelElement) { | 396 if (element is LabelElement) { |
| 396 return new RenameLabelRefactoringImpl(searchEngine, element); | 397 return new RenameLabelRefactoringImpl(searchEngine, element); |
| 397 } | 398 } |
| 398 if (element is LibraryElement) { | 399 if (element is LibraryElement) { |
| 399 return new RenameLibraryRefactoringImpl(searchEngine, element); | 400 return new RenameLibraryRefactoringImpl(searchEngine, element); |
| 400 } | 401 } |
| 401 if (element is LocalElement) { | 402 if (element is LocalElement) { |
| 402 return new RenameLocalRefactoringImpl(searchEngine, astProvider, element); | 403 return new RenameLocalRefactoringImpl(searchEngine, astProvider, element); |
| 403 } | 404 } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 _map[unitElement] = unit; | 462 _map[unitElement] = unit; |
| 462 } | 463 } |
| 463 return unit; | 464 return unit; |
| 464 } | 465 } |
| 465 | 466 |
| 466 CompilationUnitElement getUnitElement(Element element) { | 467 CompilationUnitElement getUnitElement(Element element) { |
| 467 return element.getAncestor((e) => e is CompilationUnitElement) | 468 return element.getAncestor((e) => e is CompilationUnitElement) |
| 468 as CompilationUnitElement; | 469 as CompilationUnitElement; |
| 469 } | 470 } |
| 470 } | 471 } |
| OLD | NEW |