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

Side by Side Diff: pkg/analysis_server/test/services/refactoring/abstract_refactoring.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 test.services.refactoring; 5 library test.services.refactoring;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/protocol/protocol.dart'; 9 import 'package:analysis_server/plugin/protocol/protocol.dart';
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/index2/index2.dart'; 11 import 'package:analysis_server/src/services/index2/index2.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/search/search_engine_internal2.dart '; 13 import 'package:analysis_server/src/services/search/search_engine_internal2.dart ';
14 import 'package:analyzer/dart/ast/ast.dart';
14 import 'package:analyzer/file_system/file_system.dart'; 15 import 'package:analyzer/file_system/file_system.dart';
15 import 'package:analyzer/src/generated/ast.dart';
16 import 'package:analyzer/src/generated/source.dart'; 16 import 'package:analyzer/src/generated/source.dart';
17 import 'package:unittest/unittest.dart'; 17 import 'package:unittest/unittest.dart';
18 18
19 import '../../abstract_single_unit.dart'; 19 import '../../abstract_single_unit.dart';
20 20
21 int findIdentifierLength(String search) { 21 int findIdentifierLength(String search) {
22 int length = 0; 22 int length = 0;
23 while (length < search.length) { 23 while (length < search.length) {
24 int c = search.codeUnitAt(length); 24 int c = search.codeUnitAt(length);
25 if (!(c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0) || 25 if (!(c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0) ||
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 CompilationUnit unit = resolveLibraryUnit(source); 155 CompilationUnit unit = resolveLibraryUnit(source);
156 index.indexUnit(unit); 156 index.indexUnit(unit);
157 } 157 }
158 158
159 void setUp() { 159 void setUp() {
160 super.setUp(); 160 super.setUp();
161 index = createMemoryIndex2(); 161 index = createMemoryIndex2();
162 searchEngine = new SearchEngineImpl2(index); 162 searchEngine = new SearchEngineImpl2(index);
163 } 163 }
164 } 164 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698