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

Side by Side Diff: pkg/analysis_server/lib/src/domain_analysis.dart

Issue 1063613002: Add an analysis server option to enable null-aware-operator support. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Roll the analysis server JSON API version. Created 5 years, 8 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 | Annotate | Revision Log
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 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 200
201 /** 201 /**
202 * Implement the 'analysis.updateOptions' request. 202 * Implement the 'analysis.updateOptions' request.
203 */ 203 */
204 Response updateOptions(Request request) { 204 Response updateOptions(Request request) {
205 // options 205 // options
206 var params = new AnalysisUpdateOptionsParams.fromRequest(request); 206 var params = new AnalysisUpdateOptionsParams.fromRequest(request);
207 AnalysisOptions newOptions = params.options; 207 AnalysisOptions newOptions = params.options;
208 List<OptionUpdater> updaters = new List<OptionUpdater>(); 208 List<OptionUpdater> updaters = new List<OptionUpdater>();
209 if (newOptions.enableNullAwareOperators != null) {
210 updaters.add((engine.AnalysisOptionsImpl options) {
211 options.enableNullAwareOperators = newOptions.enableNullAwareOperators;
212 });
213 }
209 if (newOptions.generateDart2jsHints != null) { 214 if (newOptions.generateDart2jsHints != null) {
210 updaters.add((engine.AnalysisOptionsImpl options) { 215 updaters.add((engine.AnalysisOptionsImpl options) {
211 options.dart2jsHint = newOptions.generateDart2jsHints; 216 options.dart2jsHint = newOptions.generateDart2jsHints;
212 }); 217 });
213 } 218 }
214 if (newOptions.generateHints != null) { 219 if (newOptions.generateHints != null) {
215 updaters.add((engine.AnalysisOptionsImpl options) { 220 updaters.add((engine.AnalysisOptionsImpl options) {
216 options.hint = newOptions.generateHints; 221 options.hint = newOptions.generateHints;
217 }); 222 });
218 } 223 }
219 server.updateOptions(updaters); 224 server.updateOptions(updaters);
220 return new AnalysisUpdateOptionsResult().toResponse(request.id); 225 return new AnalysisUpdateOptionsResult().toResponse(request.id);
221 } 226 }
222 } 227 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698