Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: pkg/analysis_server/lib/src/services/refactoring/extract_local.dart

Issue 1788223002: Deprecate the generated AST library and clean up imports (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/token.dart'; 20 import 'package:analyzer/dart/ast/token.dart';
21 import 'package:analyzer/dart/element/element.dart'; 21 import 'package:analyzer/dart/element/element.dart';
22 import 'package:analyzer/src/generated/ast.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';
23 import 'package:analyzer/src/generated/java_core.dart'; 25 import 'package:analyzer/src/generated/java_core.dart';
24 import 'package:analyzer/src/generated/source.dart'; 26 import 'package:analyzer/src/generated/source.dart';
25 27
26 const String _TOKEN_SEPARATOR = "\uFFFF"; 28 const String _TOKEN_SEPARATOR = "\uFFFF";
27 29
28 /** 30 /**
29 * [ExtractLocalRefactoring] implementation. 31 * [ExtractLocalRefactoring] implementation.
30 */ 32 */
31 class ExtractLocalRefactoringImpl extends RefactoringImpl 33 class ExtractLocalRefactoringImpl extends RefactoringImpl
32 implements ExtractLocalRefactoring { 34 implements ExtractLocalRefactoring {
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 687
686 _TokenLocalElementVisitor(this.map); 688 _TokenLocalElementVisitor(this.map);
687 689
688 visitSimpleIdentifier(SimpleIdentifier node) { 690 visitSimpleIdentifier(SimpleIdentifier node) {
689 Element element = node.staticElement; 691 Element element = node.staticElement;
690 if (element is LocalVariableElement) { 692 if (element is LocalVariableElement) {
691 map[node.token] = element; 693 map[node.token] = element;
692 } 694 }
693 } 695 }
694 } 696 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698