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 test.domain.analysis.abstract; | 5 library test.domain.analysis.abstract; |
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/analysis_server.dart'; | 10 import 'package:analysis_server/src/analysis_server.dart'; |
11 import 'package:analysis_server/src/constants.dart'; | 11 import 'package:analysis_server/src/constants.dart'; |
12 import 'package:analysis_server/src/domain_analysis.dart'; | 12 import 'package:analysis_server/src/domain_analysis.dart'; |
13 import 'package:analysis_server/src/plugin/linter_plugin.dart'; | 13 import 'package:analysis_server/src/plugin/linter_plugin.dart'; |
14 import 'package:analysis_server/src/plugin/server_plugin.dart'; | 14 import 'package:analysis_server/src/plugin/server_plugin.dart'; |
15 import 'package:analysis_server/src/provisional/completion/dart/completion_plugi
n.dart'; | 15 import 'package:analysis_server/src/provisional/completion/dart/completion_plugi
n.dart'; |
16 import 'package:analysis_server/src/services/index/index.dart'; | 16 import 'package:analysis_server/src/services/index/index.dart'; |
17 import 'package:analyzer/file_system/file_system.dart'; | 17 import 'package:analyzer/file_system/file_system.dart'; |
18 import 'package:analyzer/file_system/memory_file_system.dart'; | 18 import 'package:analyzer/file_system/memory_file_system.dart'; |
19 import 'package:analyzer/instrumentation/instrumentation.dart'; | 19 import 'package:analyzer/instrumentation/instrumentation.dart'; |
20 import 'package:analyzer/src/generated/engine.dart'; | 20 import 'package:analyzer/src/generated/engine.dart'; |
| 21 import 'package:analyzer/src/generated/sdk.dart'; |
21 import 'package:linter/src/plugin/linter_plugin.dart'; | 22 import 'package:linter/src/plugin/linter_plugin.dart'; |
22 import 'package:plugin/manager.dart'; | 23 import 'package:plugin/manager.dart'; |
23 import 'package:plugin/plugin.dart'; | 24 import 'package:plugin/plugin.dart'; |
24 import 'package:unittest/unittest.dart'; | 25 import 'package:unittest/unittest.dart'; |
25 | 26 |
26 import 'mock_sdk.dart'; | 27 import 'mock_sdk.dart'; |
27 import 'mocks.dart'; | 28 import 'mocks.dart'; |
28 | 29 |
29 int findIdentifierLength(String search) { | 30 int findIdentifierLength(String search) { |
30 int length = 0; | 31 int length = 0; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // | 123 // |
123 // Create server | 124 // Create server |
124 // | 125 // |
125 return new AnalysisServer( | 126 return new AnalysisServer( |
126 serverChannel, | 127 serverChannel, |
127 resourceProvider, | 128 resourceProvider, |
128 packageMapProvider, | 129 packageMapProvider, |
129 index, | 130 index, |
130 serverPlugin, | 131 serverPlugin, |
131 new AnalysisServerOptions(), | 132 new AnalysisServerOptions(), |
132 (_) => new MockSdk(), | 133 new DartSdkManager('', false, (_) => new MockSdk()), |
133 InstrumentationService.NULL_SERVICE); | 134 InstrumentationService.NULL_SERVICE); |
134 } | 135 } |
135 | 136 |
136 Index createIndex() { | 137 Index createIndex() { |
137 return null; | 138 return null; |
138 } | 139 } |
139 | 140 |
140 /** | 141 /** |
141 * Creates a project `/project`. | 142 * Creates a project `/project`. |
142 */ | 143 */ |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 } | 231 } |
231 | 232 |
232 /** | 233 /** |
233 * Completes with a successful [Response] for the given [request]. | 234 * Completes with a successful [Response] for the given [request]. |
234 * Otherwise fails. | 235 * Otherwise fails. |
235 */ | 236 */ |
236 Future<Response> waitResponse(Request request) async { | 237 Future<Response> waitResponse(Request request) async { |
237 return serverChannel.sendRequest(request); | 238 return serverChannel.sendRequest(request); |
238 } | 239 } |
239 } | 240 } |
OLD | NEW |