| 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:analysis_server/src/services/search/element_visitors.dart'; | |
| 21 import 'package:analyzer/src/generated/ast.dart'; | 20 import 'package:analyzer/src/generated/ast.dart'; |
| 22 import 'package:analyzer/src/generated/element.dart'; | 21 import 'package:analyzer/src/generated/element.dart'; |
| 23 import 'package:analyzer/src/generated/java_core.dart'; | 22 import 'package:analyzer/src/generated/java_core.dart'; |
| 24 import 'package:analyzer/src/generated/scanner.dart'; | 23 import 'package:analyzer/src/generated/scanner.dart'; |
| 25 import 'package:analyzer/src/generated/source.dart'; | 24 import 'package:analyzer/src/generated/source.dart'; |
| 26 | 25 |
| 27 const String _TOKEN_SEPARATOR = "\uFFFF"; | 26 const String _TOKEN_SEPARATOR = "\uFFFF"; |
| 28 | 27 |
| 29 /** | 28 /** |
| 30 * [ExtractLocalRefactoring] implementation. | 29 * [ExtractLocalRefactoring] implementation. |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 | 597 |
| 599 _TokenLocalElementVisitor(this.map); | 598 _TokenLocalElementVisitor(this.map); |
| 600 | 599 |
| 601 visitSimpleIdentifier(SimpleIdentifier node) { | 600 visitSimpleIdentifier(SimpleIdentifier node) { |
| 602 Element element = node.staticElement; | 601 Element element = node.staticElement; |
| 603 if (element is LocalVariableElement) { | 602 if (element is LocalVariableElement) { |
| 604 map[node.token] = element; | 603 map[node.token] = element; |
| 605 } | 604 } |
| 606 } | 605 } |
| 607 } | 606 } |
| OLD | NEW |