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/protocol/protocol_generated.dart' | |
8 show | |
9 RefactoringProblem, | |
10 RefactoringProblemSeverity, | |
11 SourceChange, | |
12 SourceEdit, | |
13 SourceFileEdit; | |
14 import 'package:analysis_server/src/services/correction/status.dart'; | 7 import 'package:analysis_server/src/services/correction/status.dart'; |
15 import 'package:analysis_server/src/services/index/index.dart'; | 8 import 'package:analysis_server/src/services/index/index.dart'; |
16 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; | 9 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; |
17 import 'package:analysis_server/src/services/search/search_engine.dart'; | 10 import 'package:analysis_server/src/services/search/search_engine.dart'; |
18 import 'package:analysis_server/src/services/search/search_engine_internal.dart'
; | 11 import 'package:analysis_server/src/services/search/search_engine_internal.dart'
; |
19 import 'package:analysis_server/src/services/search/search_engine_internal2.dart
'; | 12 import 'package:analysis_server/src/services/search/search_engine_internal2.dart
'; |
20 import 'package:analyzer/dart/ast/ast.dart'; | 13 import 'package:analyzer/dart/ast/ast.dart'; |
21 import 'package:analyzer/dart/element/element.dart' show Element; | 14 import 'package:analyzer/dart/element/element.dart' show Element; |
22 import 'package:analyzer/file_system/file_system.dart'; | 15 import 'package:analyzer/file_system/file_system.dart'; |
23 import 'package:analyzer/src/dart/analysis/ast_provider_context.dart'; | 16 import 'package:analyzer/src/dart/analysis/ast_provider_context.dart'; |
24 import 'package:analyzer/src/dart/analysis/ast_provider_driver.dart'; | 17 import 'package:analyzer/src/dart/analysis/ast_provider_driver.dart'; |
25 import 'package:analyzer/src/dart/element/ast_provider.dart'; | 18 import 'package:analyzer/src/dart/element/ast_provider.dart'; |
26 import 'package:analyzer/src/generated/source.dart'; | 19 import 'package:analyzer/src/generated/source.dart'; |
| 20 import 'package:analyzer_plugin/protocol/protocol_common.dart' |
| 21 show |
| 22 RefactoringProblem, |
| 23 RefactoringProblemSeverity, |
| 24 SourceChange, |
| 25 SourceEdit, |
| 26 SourceFileEdit; |
27 import 'package:test/test.dart'; | 27 import 'package:test/test.dart'; |
28 | 28 |
29 import '../../abstract_single_unit.dart'; | 29 import '../../abstract_single_unit.dart'; |
30 | 30 |
31 int findIdentifierLength(String search) { | 31 int findIdentifierLength(String search) { |
32 int length = 0; | 32 int length = 0; |
33 while (length < search.length) { | 33 while (length < search.length) { |
34 int c = search.codeUnitAt(length); | 34 int c = search.codeUnitAt(length); |
35 if (!(c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0) || | 35 if (!(c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0) || |
36 c >= 'A'.codeUnitAt(0) && c <= 'Z'.codeUnitAt(0) || | 36 c >= 'A'.codeUnitAt(0) && c <= 'Z'.codeUnitAt(0) || |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 searchEngine = new SearchEngineImpl2([driver]); | 184 searchEngine = new SearchEngineImpl2([driver]); |
185 astProvider = new AstProviderForDriver(driver); | 185 astProvider = new AstProviderForDriver(driver); |
186 } else { | 186 } else { |
187 index = createMemoryIndex(); | 187 index = createMemoryIndex(); |
188 searchEngine = new SearchEngineImpl( | 188 searchEngine = new SearchEngineImpl( |
189 index, (_) => new AstProviderForContext(context)); | 189 index, (_) => new AstProviderForContext(context)); |
190 astProvider = new AstProviderForContext(context); | 190 astProvider = new AstProviderForContext(context); |
191 } | 191 } |
192 } | 192 } |
193 } | 193 } |
OLD | NEW |