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

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

Issue 1044463004: Gracefully degrade if no source for completion (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge 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 protocol; 5 library protocol;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 part 'generated_protocol.dart'; 10 part 'generated_protocol.dart';
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 "Unanalyzed files cannot be a priority: '$fileNames'")); 829 "Unanalyzed files cannot be a priority: '$fileNames'"));
830 830
831 /** 831 /**
832 * Initialize a newly created instance to represent an error condition caused 832 * Initialize a newly created instance to represent an error condition caused
833 * by a [request] that cannot be handled by any known handlers. 833 * by a [request] that cannot be handled by any known handlers.
834 */ 834 */
835 Response.unknownRequest(Request request) : this(request.id, 835 Response.unknownRequest(Request request) : this(request.id,
836 error: new RequestError( 836 error: new RequestError(
837 RequestErrorCode.UNKNOWN_REQUEST, 'Unknown request')); 837 RequestErrorCode.UNKNOWN_REQUEST, 'Unknown request'));
838 838
839 /**
840 * Initialize a newly created instance to represent an error condition caused
841 * by a [request] referencing a source that does not exist.
842 */
843 Response.unknownSource(Request request) : this(request.id,
844 error: new RequestError(
845 RequestErrorCode.UNKNOWN_SOURCE, 'Unknown source'));
846
839 Response.unsupportedFeature(String requestId, String message) : this( 847 Response.unsupportedFeature(String requestId, String message) : this(
840 requestId, 848 requestId,
841 error: new RequestError( 849 error: new RequestError(
842 RequestErrorCode.UNSUPPORTED_FEATURE, message)); 850 RequestErrorCode.UNSUPPORTED_FEATURE, message));
843 851
844 /** 852 /**
845 * Return a table representing the structure of the Json object that will be 853 * Return a table representing the structure of the Json object that will be
846 * sent to the client to represent this response. 854 * sent to the client to represent this response.
847 */ 855 */
848 Map<String, Object> toJson() { 856 Map<String, Object> toJson() {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); 903 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
896 hash = hash ^ (hash >> 11); 904 hash = hash ^ (hash >> 11);
897 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); 905 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
898 } 906 }
899 907
900 static int hash2(a, b) => finish(combine(combine(0, a), b)); 908 static int hash2(a, b) => finish(combine(combine(0, a), b));
901 909
902 static int hash4(a, b, c, d) => 910 static int hash4(a, b, c, d) =>
903 finish(combine(combine(combine(combine(0, a), b), c), d)); 911 finish(combine(combine(combine(combine(0, a), b), c), d));
904 } 912 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/domain_completion.dart ('k') | pkg/analysis_server/test/domain_completion_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698