| 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.extract_local; | 5 library services.src.refactoring.extract_local; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analysis_server/src/protocol_server.dart' hide Element; | 10 import 'package:analysis_server/src/protocol_server.dart' hide Element; |
| 11 import 'package:analysis_server/src/services/correction/name_suggestion.dart'; | 11 import 'package:analysis_server/src/services/correction/name_suggestion.dart'; |
| 12 import 'package:analysis_server/src/services/correction/selection_analyzer.dart'
; | 12 import 'package:analysis_server/src/services/correction/selection_analyzer.dart'
; |
| 13 import 'package:analysis_server/src/services/correction/source_range.dart'; | 13 import 'package:analysis_server/src/services/correction/source_range.dart'; |
| 14 import 'package:analysis_server/src/services/correction/status.dart'; | 14 import 'package:analysis_server/src/services/correction/status.dart'; |
| 15 import 'package:analysis_server/src/services/correction/strings.dart'; | 15 import 'package:analysis_server/src/services/correction/strings.dart'; |
| 16 import 'package:analysis_server/src/services/correction/util.dart'; | 16 import 'package:analysis_server/src/services/correction/util.dart'; |
| 17 import 'package:analysis_server/src/services/refactoring/naming_conventions.dart
'; | 17 import 'package:analysis_server/src/services/refactoring/naming_conventions.dart
'; |
| 18 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; | 18 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; |
| 19 import 'package:analysis_server/src/services/refactoring/refactoring_internal.da
rt'; | 19 import 'package:analysis_server/src/services/refactoring/refactoring_internal.da
rt'; |
| 20 import 'package:analyzer/dart/ast/ast.dart'; |
| 20 import 'package:analyzer/dart/ast/token.dart'; | 21 import 'package:analyzer/dart/ast/token.dart'; |
| 22 import 'package:analyzer/dart/ast/visitor.dart'; |
| 21 import 'package:analyzer/dart/element/element.dart'; | 23 import 'package:analyzer/dart/element/element.dart'; |
| 22 import 'package:analyzer/dart/ast/ast.dart'; | |
| 23 import 'package:analyzer/dart/ast/visitor.dart'; | |
| 24 import 'package:analyzer/src/dart/ast/utilities.dart'; | 24 import 'package:analyzer/src/dart/ast/utilities.dart'; |
| 25 import 'package:analyzer/src/generated/java_core.dart'; | 25 import 'package:analyzer/src/generated/java_core.dart'; |
| 26 import 'package:analyzer/src/generated/source.dart'; | 26 import 'package:analyzer/src/generated/source.dart'; |
| 27 | 27 |
| 28 const String _TOKEN_SEPARATOR = "\uFFFF"; | 28 const String _TOKEN_SEPARATOR = "\uFFFF"; |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * [ExtractLocalRefactoring] implementation. | 31 * [ExtractLocalRefactoring] implementation. |
| 32 */ | 32 */ |
| 33 class ExtractLocalRefactoringImpl extends RefactoringImpl | 33 class ExtractLocalRefactoringImpl extends RefactoringImpl |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 | 687 |
| 688 _TokenLocalElementVisitor(this.map); | 688 _TokenLocalElementVisitor(this.map); |
| 689 | 689 |
| 690 visitSimpleIdentifier(SimpleIdentifier node) { | 690 visitSimpleIdentifier(SimpleIdentifier node) { |
| 691 Element element = node.staticElement; | 691 Element element = node.staticElement; |
| 692 if (element is LocalVariableElement) { | 692 if (element is LocalVariableElement) { |
| 693 map[node.token] = element; | 693 map[node.token] = element; |
| 694 } | 694 } |
| 695 } | 695 } |
| 696 } | 696 } |
| OLD | NEW |