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

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

Issue 332993006: Implemented analysis.setPrioritySource (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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 522
523 /** 523 /**
524 * Initialize a newly created instance to represent an error condition caused 524 * Initialize a newly created instance to represent an error condition caused
525 * by a `analysis.setSubscriptions` [request] that includes an unknown 525 * by a `analysis.setSubscriptions` [request] that includes an unknown
526 * analysis service name. 526 * analysis service name.
527 */ 527 */
528 Response.unknownAnalysisService(Request request, String name) 528 Response.unknownAnalysisService(Request request, String name)
529 : this(request.id, new RequestError(-10, 'Unknown analysis service: "$name"' )); 529 : this(request.id, new RequestError(-10, 'Unknown analysis service: "$name"' ));
530 530
531 /** 531 /**
532 * Initialize a newly created instance to represent an error condition caused
533 * by a `analysis.setPriorityFiles` [request] that includes one or more files
534 * that are not being analyzed.
535 */
536 Response.unanalyzedPriorityFiles(Request request, String fileNames)
537 : this(request.id, new RequestError(-11, "Unanalyzed files cannot be a prior ity: '$fileNames'"));
538
539 /**
532 * Initialize a newly created instance based upon the given JSON data 540 * Initialize a newly created instance based upon the given JSON data
533 */ 541 */
534 factory Response.fromJson(Map<String, Object> json) { 542 factory Response.fromJson(Map<String, Object> json) {
535 try { 543 try {
536 Object id = json[Response.ID]; 544 Object id = json[Response.ID];
537 if (id is! String) { 545 if (id is! String) {
538 return null; 546 return null;
539 } 547 }
540 Object error = json[Response.ERROR]; 548 Object error = json[Response.ERROR];
541 Object result = json[Response.RESULT]; 549 Object result = json[Response.RESULT];
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 /** 869 /**
862 * The response to be returned as a result of the failure. 870 * The response to be returned as a result of the failure.
863 */ 871 */
864 final Response response; 872 final Response response;
865 873
866 /** 874 /**
867 * Initialize a newly created exception to return the given reponse. 875 * Initialize a newly created exception to return the given reponse.
868 */ 876 */
869 RequestFailure(this.response); 877 RequestFailure(this.response);
870 } 878 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698