| 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.inline_local; | 5 library services.src.refactoring.inline_local; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/protocol.dart' hide Element; | 9 import 'package:analysis_server/src/protocol.dart' hide Element; |
| 10 import 'package:analysis_server/src/services/correction/status.dart'; | 10 import 'package:analysis_server/src/services/correction/status.dart'; |
| 11 import 'package:analysis_server/src/services/correction/util.dart'; | 11 import 'package:analysis_server/src/services/correction/util.dart'; |
| 12 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; | 12 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; |
| 13 import 'package:analysis_server/src/services/refactoring/refactoring_internal.da
rt'; | 13 import 'package:analysis_server/src/services/refactoring/refactoring_internal.da
rt'; |
| 14 import 'package:analysis_server/src/services/search/search_engine.dart'; | 14 import 'package:analysis_server/src/services/search/search_engine.dart'; |
| 15 import 'package:analyzer/src/generated/ast.dart'; | 15 import 'package:analyzer/src/generated/ast.dart'; |
| 16 import 'package:analyzer/src/generated/element.dart'; | 16 import 'package:analyzer/src/generated/element.dart'; |
| 17 import 'package:analyzer/src/generated/java_core.dart'; | 17 import 'package:analyzer/src/generated/java_core.dart'; |
| 18 import 'package:analyzer/src/generated/scanner.dart'; | 18 import 'package:analyzer/src/generated/scanner.dart'; |
| 19 import 'package:analyzer/src/generated/source.dart'; | 19 import 'package:analyzer/src/generated/source.dart'; |
| 20 | 20 |
| 21 | 21 |
| 22 const String _TOKEN_SEPARATOR = "\uFFFF"; | |
| 23 | |
| 24 | |
| 25 /** | 22 /** |
| 26 * [InlineLocalRefactoring] implementation. | 23 * [InlineLocalRefactoring] implementation. |
| 27 */ | 24 */ |
| 28 class InlineLocalRefactoringImpl extends RefactoringImpl implements | 25 class InlineLocalRefactoringImpl extends RefactoringImpl implements |
| 29 InlineLocalRefactoring { | 26 InlineLocalRefactoring { |
| 30 final SearchEngine searchEngine; | 27 final SearchEngine searchEngine; |
| 31 final CompilationUnit unit; | 28 final CompilationUnit unit; |
| 32 final int offset; | 29 final int offset; |
| 33 CompilationUnitElement unitElement; | 30 CompilationUnitElement unitElement; |
| 34 CorrectionUtils utils; | 31 CorrectionUtils utils; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 */ | 177 */ |
| 181 bool _isIdentifierStringInterpolation(AstNode parent) { | 178 bool _isIdentifierStringInterpolation(AstNode parent) { |
| 182 if (parent is InterpolationExpression) { | 179 if (parent is InterpolationExpression) { |
| 183 InterpolationExpression element = parent; | 180 InterpolationExpression element = parent; |
| 184 return element.beginToken.type == | 181 return element.beginToken.type == |
| 185 TokenType.STRING_INTERPOLATION_IDENTIFIER; | 182 TokenType.STRING_INTERPOLATION_IDENTIFIER; |
| 186 } | 183 } |
| 187 return false; | 184 return false; |
| 188 } | 185 } |
| 189 } | 186 } |
| OLD | NEW |