| 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.dart'; | 7 import 'package:analysis_server/protocol/protocol.dart'; |
| 8 import 'package:analysis_server/protocol/protocol_constants.dart'; |
| 8 import 'package:analysis_server/protocol/protocol_generated.dart'; | 9 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| 9 import 'package:analysis_server/src/analysis_server.dart'; | 10 import 'package:analysis_server/src/analysis_server.dart'; |
| 10 import 'package:analysis_server/src/collections.dart'; | 11 import 'package:analysis_server/src/collections.dart'; |
| 11 import 'package:analysis_server/src/constants.dart'; | |
| 12 import 'package:analysis_server/src/domain_abstract.dart'; | 12 import 'package:analysis_server/src/domain_abstract.dart'; |
| 13 import 'package:analysis_server/src/plugin/plugin_manager.dart'; | 13 import 'package:analysis_server/src/plugin/plugin_manager.dart'; |
| 14 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
; | 14 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
; |
| 15 import 'package:analysis_server/src/services/completion/completion_core.dart'; | 15 import 'package:analysis_server/src/services/completion/completion_core.dart'; |
| 16 import 'package:analysis_server/src/services/completion/completion_performance.d
art'; | 16 import 'package:analysis_server/src/services/completion/completion_performance.d
art'; |
| 17 import 'package:analyzer/src/dart/analysis/driver.dart'; | 17 import 'package:analyzer/src/dart/analysis/driver.dart'; |
| 18 import 'package:analyzer/src/generated/source.dart'; | 18 import 'package:analyzer/src/generated/source.dart'; |
| 19 import 'package:analyzer_plugin/protocol/protocol.dart' as plugin; | 19 import 'package:analyzer_plugin/protocol/protocol.dart' as plugin; |
| 20 import 'package:analyzer_plugin/protocol/protocol_common.dart'; | 20 import 'package:analyzer_plugin/protocol/protocol_common.dart'; |
| 21 import 'package:analyzer_plugin/protocol/protocol_constants.dart' as plugin; | 21 import 'package:analyzer_plugin/protocol/protocol_constants.dart' as plugin; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // Return the result. | 141 // Return the result. |
| 142 // | 142 // |
| 143 return new CompletionResult( | 143 return new CompletionResult( |
| 144 request.replacementOffset, request.replacementLength, suggestions); | 144 request.replacementOffset, request.replacementLength, suggestions); |
| 145 } | 145 } |
| 146 | 146 |
| 147 @override | 147 @override |
| 148 Response handleRequest(Request request) { | 148 Response handleRequest(Request request) { |
| 149 return runZoned(() { | 149 return runZoned(() { |
| 150 String requestName = request.method; | 150 String requestName = request.method; |
| 151 if (requestName == COMPLETION_GET_SUGGESTIONS) { | 151 if (requestName == COMPLETION_REQUEST_GET_SUGGESTIONS) { |
| 152 processRequest(request); | 152 processRequest(request); |
| 153 return Response.DELAYED_RESPONSE; | 153 return Response.DELAYED_RESPONSE; |
| 154 } | 154 } |
| 155 return null; | 155 return null; |
| 156 }, onError: (exception, stackTrace) { | 156 }, onError: (exception, stackTrace) { |
| 157 server.sendServerErrorNotification( | 157 server.sendServerErrorNotification( |
| 158 'Failed to handle completion domain request: ${request.toJson()}', | 158 'Failed to handle completion domain request: ${request.toJson()}', |
| 159 exception, | 159 exception, |
| 160 stackTrace); | 160 stackTrace); |
| 161 }); | 161 }); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 final int replacementOffset; | 293 final int replacementOffset; |
| 294 | 294 |
| 295 /** | 295 /** |
| 296 * The suggested completions. | 296 * The suggested completions. |
| 297 */ | 297 */ |
| 298 final List<CompletionSuggestion> suggestions; | 298 final List<CompletionSuggestion> suggestions; |
| 299 | 299 |
| 300 CompletionResult( | 300 CompletionResult( |
| 301 this.replacementOffset, this.replacementLength, this.suggestions); | 301 this.replacementOffset, this.replacementLength, this.suggestions); |
| 302 } | 302 } |
| OLD | NEW |