| 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 domain.analysis; | 5 library domain.analysis; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/analysis_server.dart'; | 9 import 'package:analysis_server/src/analysis_server.dart'; |
| 10 import 'package:analysis_server/src/computer/computer_hover.dart'; | 10 import 'package:analysis_server/src/computer/computer_hover.dart'; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 (List<String> subscriptions) => subscriptions.toSet()); | 142 (List<String> subscriptions) => subscriptions.toSet()); |
| 143 server.setAnalysisSubscriptions(subMap); | 143 server.setAnalysisSubscriptions(subMap); |
| 144 return new AnalysisSetSubscriptionsResult().toResponse(request.id); | 144 return new AnalysisSetSubscriptionsResult().toResponse(request.id); |
| 145 } | 145 } |
| 146 | 146 |
| 147 /** | 147 /** |
| 148 * Implement the 'analysis.updateContent' request. | 148 * Implement the 'analysis.updateContent' request. |
| 149 */ | 149 */ |
| 150 Response updateContent(Request request) { | 150 Response updateContent(Request request) { |
| 151 var params = new AnalysisUpdateContentParams.fromRequest(request); | 151 var params = new AnalysisUpdateContentParams.fromRequest(request); |
| 152 server.updateContent(params.files); | 152 server.updateContent(request.id, params.files); |
| 153 return new AnalysisUpdateContentResult().toResponse(request.id); | 153 return new AnalysisUpdateContentResult().toResponse(request.id); |
| 154 } | 154 } |
| 155 | 155 |
| 156 /** | 156 /** |
| 157 * Implement the 'analysis.updateOptions' request. | 157 * Implement the 'analysis.updateOptions' request. |
| 158 */ | 158 */ |
| 159 Response updateOptions(Request request) { | 159 Response updateOptions(Request request) { |
| 160 // options | 160 // options |
| 161 var params = new AnalysisUpdateOptionsParams.fromRequest(request); | 161 var params = new AnalysisUpdateOptionsParams.fromRequest(request); |
| 162 AnalysisOptions newOptions = params.options; | 162 AnalysisOptions newOptions = params.options; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 } | 194 } |
| 195 if (newOptions.generateHints != null) { | 195 if (newOptions.generateHints != null) { |
| 196 updaters.add((engine.AnalysisOptionsImpl options) { | 196 updaters.add((engine.AnalysisOptionsImpl options) { |
| 197 options.hint = newOptions.generateHints; | 197 options.hint = newOptions.generateHints; |
| 198 }); | 198 }); |
| 199 } | 199 } |
| 200 server.updateOptions(updaters); | 200 server.updateOptions(updaters); |
| 201 return new AnalysisUpdateOptionsResult().toResponse(request.id); | 201 return new AnalysisUpdateOptionsResult().toResponse(request.id); |
| 202 } | 202 } |
| 203 } | 203 } |
| OLD | NEW |