OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 'package:analysis_server/plugin/protocol/protocol.dart' as server; | 5 import 'package:analysis_server/plugin/protocol/protocol.dart' as server; |
6 import 'package:analysis_server/src/protocol/protocol_internal.dart' as server; | 6 import 'package:analysis_server/src/protocol/protocol_internal.dart' as server; |
7 import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin; | 7 import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin; |
8 | 8 |
9 /** | 9 /** |
10 * An object used to convert between similar objects defined by both the plugin | 10 * An object used to convert between similar objects defined by both the plugin |
11 * protocol and the server protocol. | 11 * protocol and the server protocol. |
12 */ | 12 */ |
13 class RequestConverter { | 13 class RequestConverter { |
| 14 plugin.AnalysisReanalyzeParams convertAnalysisReanalyzeParams( |
| 15 server.AnalysisReanalyzeParams params) { |
| 16 return new plugin.AnalysisReanalyzeParams(roots: params.roots); |
| 17 } |
| 18 |
14 plugin.AnalysisService convertAnalysisService( | 19 plugin.AnalysisService convertAnalysisService( |
15 server.AnalysisService service) { | 20 server.AnalysisService service) { |
16 return new plugin.AnalysisService(service.name); | 21 return new plugin.AnalysisService(service.name); |
17 } | 22 } |
18 | 23 |
19 plugin.AnalysisSetPriorityFilesParams convertAnalysisSetPriorityFilesParams( | 24 plugin.AnalysisSetPriorityFilesParams convertAnalysisSetPriorityFilesParams( |
20 server.AnalysisSetPriorityFilesParams params) { | 25 server.AnalysisSetPriorityFilesParams params) { |
21 return new plugin.AnalysisSetPriorityFilesParams(params.files); | 26 return new plugin.AnalysisSetPriorityFilesParams(params.files); |
22 } | 27 } |
23 | 28 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 } else if (overlay is server.RemoveContentOverlay) { | 63 } else if (overlay is server.RemoveContentOverlay) { |
59 return new plugin.RemoveContentOverlay(); | 64 return new plugin.RemoveContentOverlay(); |
60 } | 65 } |
61 return null; | 66 return null; |
62 } | 67 } |
63 | 68 |
64 plugin.SourceEdit convertSourceEdit(server.SourceEdit edit) { | 69 plugin.SourceEdit convertSourceEdit(server.SourceEdit edit) { |
65 return new plugin.SourceEdit(edit.offset, edit.length, edit.replacement); | 70 return new plugin.SourceEdit(edit.offset, edit.length, edit.replacement); |
66 } | 71 } |
67 } | 72 } |
OLD | NEW |