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

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

Issue 335123008: Implement analysis.updateOptions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 protocol; 5 library protocol;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:convert' show JsonDecoder; 8 import 'dart:convert' show JsonDecoder;
9 9
10 /** 10 /**
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 530
531 /** 531 /**
532 * Initialize a newly created instance to represent an error condition caused 532 * Initialize a newly created instance to represent an error condition caused
533 * by a `analysis.setPriorityFiles` [request] that includes one or more files 533 * by a `analysis.setPriorityFiles` [request] that includes one or more files
534 * that are not being analyzed. 534 * that are not being analyzed.
535 */ 535 */
536 Response.unanalyzedPriorityFiles(Request request, String fileNames) 536 Response.unanalyzedPriorityFiles(Request request, String fileNames)
537 : this(request.id, new RequestError(-11, "Unanalyzed files cannot be a prior ity: '$fileNames'")); 537 : this(request.id, new RequestError(-11, "Unanalyzed files cannot be a prior ity: '$fileNames'"));
538 538
539 /** 539 /**
540 * Initialize a newly created instance to represent an error condition caused
541 * by a `analysis.updateOptions` [request] that includes an unknown analysis
542 * option.
543 */
544 Response.unknownOptionName(Request request, String optionName)
545 : this(request.id, new RequestError(-12, 'Unknown analysis option: "$optionN ame"'));
Paul Berry 2014/06/17 20:40:54 I have a vague memory that we decided to simply ig
Brian Wilkerson 2014/06/17 21:30:12 We thought it might help with version skew issues,
Paul Berry 2014/06/17 22:24:56 Now that I think about it again, I don't really ha
546
547 /**
540 * Initialize a newly created instance based upon the given JSON data 548 * Initialize a newly created instance based upon the given JSON data
541 */ 549 */
542 factory Response.fromJson(Map<String, Object> json) { 550 factory Response.fromJson(Map<String, Object> json) {
543 try { 551 try {
544 Object id = json[Response.ID]; 552 Object id = json[Response.ID];
545 if (id is! String) { 553 if (id is! String) {
546 return null; 554 return null;
547 } 555 }
548 Object error = json[Response.ERROR]; 556 Object error = json[Response.ERROR];
549 Object result = json[Response.RESULT]; 557 Object result = json[Response.RESULT];
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 /** 877 /**
870 * The response to be returned as a result of the failure. 878 * The response to be returned as a result of the failure.
871 */ 879 */
872 final Response response; 880 final Response response;
873 881
874 /** 882 /**
875 * Initialize a newly created exception to return the given reponse. 883 * Initialize a newly created exception to return the given reponse.
876 */ 884 */
877 RequestFailure(this.response); 885 RequestFailure(this.response);
878 } 886 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698