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

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

Issue 601083005: Implement 'edit.sortMembers' request. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Forgot to add tests Created 6 years, 2 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 import 'package:analysis_server/src/computer/element.dart' show 10 import 'package:analysis_server/src/computer/element.dart' show
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 "Expected parameter $path to $expectation")); 955 "Expected parameter $path to $expectation"));
956 956
957 /** 957 /**
958 * Initialize a newly created instance to represent an error condition caused 958 * Initialize a newly created instance to represent an error condition caused
959 * by a malformed request. 959 * by a malformed request.
960 */ 960 */
961 Response.invalidRequestFormat() 961 Response.invalidRequestFormat()
962 : this('', error: new RequestError(RequestErrorCode.INVALID_REQUEST, 'Invali d request')); 962 : this('', error: new RequestError(RequestErrorCode.INVALID_REQUEST, 'Invali d request'));
963 963
964 /** 964 /**
965 * Initialize a newly created instance to represent the
966 * SORT_MEMBERS_INVALID_FILE error condition.
967 */
968 Response.sortMembersInvalidFile(Request request)
969 : this(
970 request.id,
971 error: new RequestError(RequestErrorCode.SORT_MEMBERS_INVALID_FILE,
972 'Error during `edit.sortMembers`: invalid file.'));
973
974 /**
975 * Initialize a newly created instance to represent the
976 * SORT_MEMBERS_PARSE_ERRORS error condition.
977 */
978 Response.sortMembersParseErrors(Request request, int numErrors)
979 : this(
980 request.id,
981 error: new RequestError(RequestErrorCode.SORT_MEMBERS_PARSE_ERRORS,
982 'Error during `edit.sortMembers`: file has $numErrors scan/parse err ors.'));
983
984 /**
965 * Initialize a newly created instance to represent an error condition caused 985 * Initialize a newly created instance to represent an error condition caused
966 * by a `analysis.setPriorityFiles` [request] that includes one or more files 986 * by a `analysis.setPriorityFiles` [request] that includes one or more files
967 * that are not being analyzed. 987 * that are not being analyzed.
968 */ 988 */
969 Response.unanalyzedPriorityFiles(Request request, String fileNames) 989 Response.unanalyzedPriorityFiles(Request request, String fileNames)
970 : this(request.id, error: new RequestError(RequestErrorCode.UNANALYZED_PRIOR ITY_FILES, "Unanalyzed files cannot be a priority: '$fileNames'")); 990 : this(request.id, error: new RequestError(RequestErrorCode.UNANALYZED_PRIOR ITY_FILES, "Unanalyzed files cannot be a priority: '$fileNames'"));
971 991
972 /** 992 /**
973 * Initialize a newly created instance to represent an error condition caused 993 * Initialize a newly created instance to represent an error condition caused
974 * by a [request] that cannot be handled by any known handlers. 994 * by a [request] that cannot be handled by any known handlers.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); 1053 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
1034 hash = hash ^ (hash >> 11); 1054 hash = hash ^ (hash >> 11);
1035 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); 1055 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
1036 } 1056 }
1037 1057
1038 static int hash2(a, b) => finish(combine(combine(0, a), b)); 1058 static int hash2(a, b) => finish(combine(combine(0, a), b));
1039 1059
1040 static int hash4(a, b, c, d) => 1060 static int hash4(a, b, c, d) =>
1041 finish(combine(combine(combine(combine(0, a), b), c), d)); 1061 finish(combine(combine(combine(combine(0, a), b), c), d));
1042 } 1062 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/edit/edit_domain.dart ('k') | pkg/analysis_server/test/edit/sort_members_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698