| OLD | NEW |
| 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 // This file has been automatically generated. Please do not edit it manually. | 5 // This file has been automatically generated. Please do not edit it manually. |
| 6 // To regenerate the file, use the script | 6 // To regenerate the file, use the script |
| 7 // "pkg/analysis_server/spec/generate_files". | 7 // "pkg/analysis_server/spec/generate_files". |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Convenience methods for running integration tests | 10 * Convenience methods for running integration tests |
| (...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 * The file containing the errors for which fixes are being requested. | 1076 * The file containing the errors for which fixes are being requested. |
| 1077 * | 1077 * |
| 1078 * offset ( int ) | 1078 * offset ( int ) |
| 1079 * | 1079 * |
| 1080 * The offset used to select the errors for which fixes will be returned. | 1080 * The offset used to select the errors for which fixes will be returned. |
| 1081 * | 1081 * |
| 1082 * Returns | 1082 * Returns |
| 1083 * | 1083 * |
| 1084 * fixes ( List<AnalysisErrorFixes> ) | 1084 * fixes ( List<AnalysisErrorFixes> ) |
| 1085 * | 1085 * |
| 1086 * The fixes that are available for each of the analysis errors. There is a | 1086 * The fixes that are available for the errors at the given offset. |
| 1087 * one-to-one correspondence between the analysis errors in the request and | |
| 1088 * the lists of changes in the response. In particular, it is always the | |
| 1089 * case that errors.length == fixes.length and that fixes[i] is the list of | |
| 1090 * fixes for the error in errors[i]. The list of changes corresponding to | |
| 1091 * an error can be empty if there are no fixes available for that error. | |
| 1092 */ | 1087 */ |
| 1093 Future sendEditGetFixes(String file, int offset, {bool checkTypes: true}) { | 1088 Future sendEditGetFixes(String file, int offset, {bool checkTypes: true}) { |
| 1094 Map<String, dynamic> params = {}; | 1089 Map<String, dynamic> params = {}; |
| 1095 params["file"] = file; | 1090 params["file"] = file; |
| 1096 params["offset"] = offset; | 1091 params["offset"] = offset; |
| 1097 if (checkTypes) { | 1092 if (checkTypes) { |
| 1098 expect(params, isEditGetFixesParams); | 1093 expect(params, isEditGetFixesParams); |
| 1099 } | 1094 } |
| 1100 return server.send("edit.getFixes", params) | 1095 return server.send("edit.getFixes", params) |
| 1101 .then((result) { | 1096 .then((result) { |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 return server.send("edit.getRefactoring", params) | 1182 return server.send("edit.getRefactoring", params) |
| 1188 .then((result) { | 1183 .then((result) { |
| 1189 if (checkTypes) { | 1184 if (checkTypes) { |
| 1190 expect(result, isEditGetRefactoringResult); | 1185 expect(result, isEditGetRefactoringResult); |
| 1191 } | 1186 } |
| 1192 return result; | 1187 return result; |
| 1193 }); | 1188 }); |
| 1194 } | 1189 } |
| 1195 | 1190 |
| 1196 /** | 1191 /** |
| 1197 * Create a debugging context for the executable file with the given path. | 1192 * Create an execution context for the executable file with the given path. |
| 1198 * The context that is created will persist until debug.deleteContext is used | 1193 * The context that is created will persist until execution.deleteContext is |
| 1199 * to delete it. Clients, therefore, are responsible for managing the | 1194 * used to delete it. Clients, therefore, are responsible for managing the |
| 1200 * lifetime of debugging contexts. | 1195 * lifetime of execution contexts. |
| 1201 * | 1196 * |
| 1202 * Parameters | 1197 * Parameters |
| 1203 * | 1198 * |
| 1204 * contextRoot ( FilePath ) | 1199 * contextRoot ( FilePath ) |
| 1205 * | 1200 * |
| 1206 * The path of the Dart or HTML file that will be launched. | 1201 * The path of the Dart or HTML file that will be launched. |
| 1207 * | 1202 * |
| 1208 * Returns | 1203 * Returns |
| 1209 * | 1204 * |
| 1210 * id ( DebugContextId ) | 1205 * id ( ExecutionContextId ) |
| 1211 * | 1206 * |
| 1212 * The identifier used to refer to the debugging context that was created. | 1207 * The identifier used to refer to the execution context that was created. |
| 1213 */ | 1208 */ |
| 1214 Future sendDebugCreateContext(String contextRoot, {bool checkTypes: true}) { | 1209 Future sendExecutionCreateContext(String contextRoot, {bool checkTypes: true})
{ |
| 1215 Map<String, dynamic> params = {}; | 1210 Map<String, dynamic> params = {}; |
| 1216 params["contextRoot"] = contextRoot; | 1211 params["contextRoot"] = contextRoot; |
| 1217 if (checkTypes) { | 1212 if (checkTypes) { |
| 1218 expect(params, isDebugCreateContextParams); | 1213 expect(params, isExecutionCreateContextParams); |
| 1219 } | 1214 } |
| 1220 return server.send("debug.createContext", params) | 1215 return server.send("execution.createContext", params) |
| 1221 .then((result) { | 1216 .then((result) { |
| 1222 if (checkTypes) { | 1217 if (checkTypes) { |
| 1223 expect(result, isDebugCreateContextResult); | 1218 expect(result, isExecutionCreateContextResult); |
| 1224 } | 1219 } |
| 1225 return result; | 1220 return result; |
| 1226 }); | 1221 }); |
| 1227 } | 1222 } |
| 1228 | 1223 |
| 1229 /** | 1224 /** |
| 1230 * Delete the debugging context with the given identifier. The context id is | 1225 * Delete the execution context with the given identifier. The context id is |
| 1231 * no longer valid after this command. The server is allowed to re-use ids | 1226 * no longer valid after this command. The server is allowed to re-use ids |
| 1232 * when they are no longer valid. | 1227 * when they are no longer valid. |
| 1233 * | 1228 * |
| 1234 * Parameters | 1229 * Parameters |
| 1235 * | 1230 * |
| 1236 * id ( DebugContextId ) | 1231 * id ( ExecutionContextId ) |
| 1237 * | 1232 * |
| 1238 * The identifier of the debugging context that is to be deleted. | 1233 * The identifier of the execution context that is to be deleted. |
| 1239 */ | 1234 */ |
| 1240 Future sendDebugDeleteContext(String id, {bool checkTypes: true}) { | 1235 Future sendExecutionDeleteContext(String id, {bool checkTypes: true}) { |
| 1241 Map<String, dynamic> params = {}; | 1236 Map<String, dynamic> params = {}; |
| 1242 params["id"] = id; | 1237 params["id"] = id; |
| 1243 if (checkTypes) { | 1238 if (checkTypes) { |
| 1244 expect(params, isDebugDeleteContextParams); | 1239 expect(params, isExecutionDeleteContextParams); |
| 1245 } | 1240 } |
| 1246 return server.send("debug.deleteContext", params) | 1241 return server.send("execution.deleteContext", params) |
| 1247 .then((result) { | 1242 .then((result) { |
| 1248 if (checkTypes) { | 1243 if (checkTypes) { |
| 1249 expect(result, isDebugDeleteContextResult); | 1244 expect(result, isExecutionDeleteContextResult); |
| 1250 } | 1245 } |
| 1251 return result; | 1246 return result; |
| 1252 }); | 1247 }); |
| 1253 } | 1248 } |
| 1254 | 1249 |
| 1255 /** | 1250 /** |
| 1256 * Map a URI from the debugging context to the file that it corresponds to, | 1251 * Map a URI from the execution context to the file that it corresponds to, |
| 1257 * or map a file to the URI that it corresponds to in the debugging context. | 1252 * or map a file to the URI that it corresponds to in the execution context. |
| 1258 * | 1253 * |
| 1259 * Exactly one of the file and uri fields must be provided. | 1254 * Exactly one of the file and uri fields must be provided. |
| 1260 * | 1255 * |
| 1261 * Parameters | 1256 * Parameters |
| 1262 * | 1257 * |
| 1263 * id ( DebugContextId ) | 1258 * id ( ExecutionContextId ) |
| 1264 * | 1259 * |
| 1265 * The identifier of the debugging context in which the URI is to be | 1260 * The identifier of the execution context in which the URI is to be |
| 1266 * mapped. | 1261 * mapped. |
| 1267 * | 1262 * |
| 1268 * file ( optional FilePath ) | 1263 * file ( optional FilePath ) |
| 1269 * | 1264 * |
| 1270 * The path of the file to be mapped into a URI. | 1265 * The path of the file to be mapped into a URI. |
| 1271 * | 1266 * |
| 1272 * uri ( optional String ) | 1267 * uri ( optional String ) |
| 1273 * | 1268 * |
| 1274 * The URI to be mapped into a file path. | 1269 * The URI to be mapped into a file path. |
| 1275 * | 1270 * |
| 1276 * Returns | 1271 * Returns |
| 1277 * | 1272 * |
| 1278 * file ( optional FilePath ) | 1273 * file ( optional FilePath ) |
| 1279 * | 1274 * |
| 1280 * The file to which the URI was mapped. This field is omitted if the uri | 1275 * The file to which the URI was mapped. This field is omitted if the uri |
| 1281 * field was not given in the request. | 1276 * field was not given in the request. |
| 1282 * | 1277 * |
| 1283 * uri ( optional String ) | 1278 * uri ( optional String ) |
| 1284 * | 1279 * |
| 1285 * The URI to which the file path was mapped. This field is omitted if the | 1280 * The URI to which the file path was mapped. This field is omitted if the |
| 1286 * file field was not given in the request. | 1281 * file field was not given in the request. |
| 1287 */ | 1282 */ |
| 1288 Future sendDebugMapUri(String id, {String file, String uri, bool checkTypes: t
rue}) { | 1283 Future sendExecutionMapUri(String id, {String file, String uri, bool checkType
s: true}) { |
| 1289 Map<String, dynamic> params = {}; | 1284 Map<String, dynamic> params = {}; |
| 1290 params["id"] = id; | 1285 params["id"] = id; |
| 1291 if (file != null) { | 1286 if (file != null) { |
| 1292 params["file"] = file; | 1287 params["file"] = file; |
| 1293 } | 1288 } |
| 1294 if (uri != null) { | 1289 if (uri != null) { |
| 1295 params["uri"] = uri; | 1290 params["uri"] = uri; |
| 1296 } | 1291 } |
| 1297 if (checkTypes) { | 1292 if (checkTypes) { |
| 1298 expect(params, isDebugMapUriParams); | 1293 expect(params, isExecutionMapUriParams); |
| 1299 } | 1294 } |
| 1300 return server.send("debug.mapUri", params) | 1295 return server.send("execution.mapUri", params) |
| 1301 .then((result) { | 1296 .then((result) { |
| 1302 if (checkTypes) { | 1297 if (checkTypes) { |
| 1303 expect(result, isDebugMapUriResult); | 1298 expect(result, isExecutionMapUriResult); |
| 1304 } | 1299 } |
| 1305 return result; | 1300 return result; |
| 1306 }); | 1301 }); |
| 1307 } | 1302 } |
| 1308 | 1303 |
| 1309 /** | 1304 /** |
| 1310 * Subscribe for services. All previous subscriptions are replaced by the | 1305 * Subscribe for services. All previous subscriptions are replaced by the |
| 1311 * given set of services. | 1306 * given set of services. |
| 1312 * | 1307 * |
| 1313 * It is an error if any of the elements in the list are not valid services. | 1308 * It is an error if any of the elements in the list are not valid services. |
| 1314 * If there is an error, then the current subscriptions will remain | 1309 * If there is an error, then the current subscriptions will remain |
| 1315 * unchanged. | 1310 * unchanged. |
| 1316 * | 1311 * |
| 1317 * Parameters | 1312 * Parameters |
| 1318 * | 1313 * |
| 1319 * subscriptions ( List<DebugService> ) | 1314 * subscriptions ( List<ExecutionService> ) |
| 1320 * | 1315 * |
| 1321 * A list of the services being subscribed to. | 1316 * A list of the services being subscribed to. |
| 1322 */ | 1317 */ |
| 1323 Future sendDebugSetSubscriptions(List<String> subscriptions, {bool checkTypes:
true}) { | 1318 Future sendExecutionSetSubscriptions(List<String> subscriptions, {bool checkTy
pes: true}) { |
| 1324 Map<String, dynamic> params = {}; | 1319 Map<String, dynamic> params = {}; |
| 1325 params["subscriptions"] = subscriptions; | 1320 params["subscriptions"] = subscriptions; |
| 1326 if (checkTypes) { | 1321 if (checkTypes) { |
| 1327 expect(params, isDebugSetSubscriptionsParams); | 1322 expect(params, isExecutionSetSubscriptionsParams); |
| 1328 } | 1323 } |
| 1329 return server.send("debug.setSubscriptions", params) | 1324 return server.send("execution.setSubscriptions", params) |
| 1330 .then((result) { | 1325 .then((result) { |
| 1331 if (checkTypes) { | 1326 if (checkTypes) { |
| 1332 expect(result, isDebugSetSubscriptionsResult); | 1327 expect(result, isExecutionSetSubscriptionsResult); |
| 1333 } | 1328 } |
| 1334 return result; | 1329 return result; |
| 1335 }); | 1330 }); |
| 1336 } | 1331 } |
| 1337 | 1332 |
| 1338 /** | 1333 /** |
| 1339 * Reports information needed to allow applications within the given context | 1334 * Reports information needed to allow applications within the given context |
| 1340 * to be launched. | 1335 * to be launched. |
| 1341 * | 1336 * |
| 1342 * This notification is not subscribed to by default. Clients can subscribe | 1337 * This notification is not subscribed to by default. Clients can subscribe |
| 1343 * by including the value "LAUNCH_DATA" in the list of services passed in a | 1338 * by including the value "LAUNCH_DATA" in the list of services passed in a |
| 1344 * debug.setSubscriptions request. | 1339 * execution.setSubscriptions request. |
| 1345 * | 1340 * |
| 1346 * Parameters | 1341 * Parameters |
| 1347 * | 1342 * |
| 1348 * executables ( List<ExecutableFile> ) | 1343 * executables ( List<ExecutableFile> ) |
| 1349 * | 1344 * |
| 1350 * A list of the files that are executable in the given context. This list | 1345 * A list of the files that are executable in the given context. This list |
| 1351 * replaces any previous list provided for the given context. | 1346 * replaces any previous list provided for the given context. |
| 1352 * | 1347 * |
| 1353 * dartToHtml ( Map<FilePath, List<FilePath>> ) | 1348 * dartToHtml ( Map<FilePath, List<FilePath>> ) |
| 1354 * | 1349 * |
| 1355 * A mapping from the paths of Dart files that are referenced by HTML files | 1350 * A mapping from the paths of Dart files that are referenced by HTML files |
| 1356 * to a list of the HTML files that reference the Dart files. | 1351 * to a list of the HTML files that reference the Dart files. |
| 1357 * | 1352 * |
| 1358 * htmlToDart ( Map<FilePath, List<FilePath>> ) | 1353 * htmlToDart ( Map<FilePath, List<FilePath>> ) |
| 1359 * | 1354 * |
| 1360 * A mapping from the paths of HTML files that reference Dart files to a | 1355 * A mapping from the paths of HTML files that reference Dart files to a |
| 1361 * list of the Dart files they reference. | 1356 * list of the Dart files they reference. |
| 1362 */ | 1357 */ |
| 1363 Stream onDebugLaunchData; | 1358 Stream onExecutionLaunchData; |
| 1364 | 1359 |
| 1365 /** | 1360 /** |
| 1366 * Stream controller for [onDebugLaunchData]. | 1361 * Stream controller for [onExecutionLaunchData]. |
| 1367 */ | 1362 */ |
| 1368 StreamController _onDebugLaunchData; | 1363 StreamController _onExecutionLaunchData; |
| 1369 | 1364 |
| 1370 /** | 1365 /** |
| 1371 * Initialize the fields in InttestMixin, and ensure that notifications will | 1366 * Initialize the fields in InttestMixin, and ensure that notifications will |
| 1372 * be handled. | 1367 * be handled. |
| 1373 */ | 1368 */ |
| 1374 void initializeInttestMixin() { | 1369 void initializeInttestMixin() { |
| 1375 _onServerConnected = new StreamController(sync: true); | 1370 _onServerConnected = new StreamController(sync: true); |
| 1376 onServerConnected = _onServerConnected.stream.asBroadcastStream(); | 1371 onServerConnected = _onServerConnected.stream.asBroadcastStream(); |
| 1377 _onServerError = new StreamController(sync: true); | 1372 _onServerError = new StreamController(sync: true); |
| 1378 onServerError = _onServerError.stream.asBroadcastStream(); | 1373 onServerError = _onServerError.stream.asBroadcastStream(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1391 _onAnalysisOccurrences = new StreamController(sync: true); | 1386 _onAnalysisOccurrences = new StreamController(sync: true); |
| 1392 onAnalysisOccurrences = _onAnalysisOccurrences.stream.asBroadcastStream(); | 1387 onAnalysisOccurrences = _onAnalysisOccurrences.stream.asBroadcastStream(); |
| 1393 _onAnalysisOutline = new StreamController(sync: true); | 1388 _onAnalysisOutline = new StreamController(sync: true); |
| 1394 onAnalysisOutline = _onAnalysisOutline.stream.asBroadcastStream(); | 1389 onAnalysisOutline = _onAnalysisOutline.stream.asBroadcastStream(); |
| 1395 _onAnalysisOverrides = new StreamController(sync: true); | 1390 _onAnalysisOverrides = new StreamController(sync: true); |
| 1396 onAnalysisOverrides = _onAnalysisOverrides.stream.asBroadcastStream(); | 1391 onAnalysisOverrides = _onAnalysisOverrides.stream.asBroadcastStream(); |
| 1397 _onCompletionResults = new StreamController(sync: true); | 1392 _onCompletionResults = new StreamController(sync: true); |
| 1398 onCompletionResults = _onCompletionResults.stream.asBroadcastStream(); | 1393 onCompletionResults = _onCompletionResults.stream.asBroadcastStream(); |
| 1399 _onSearchResults = new StreamController(sync: true); | 1394 _onSearchResults = new StreamController(sync: true); |
| 1400 onSearchResults = _onSearchResults.stream.asBroadcastStream(); | 1395 onSearchResults = _onSearchResults.stream.asBroadcastStream(); |
| 1401 _onDebugLaunchData = new StreamController(sync: true); | 1396 _onExecutionLaunchData = new StreamController(sync: true); |
| 1402 onDebugLaunchData = _onDebugLaunchData.stream.asBroadcastStream(); | 1397 onExecutionLaunchData = _onExecutionLaunchData.stream.asBroadcastStream(); |
| 1403 } | 1398 } |
| 1404 | 1399 |
| 1405 /** | 1400 /** |
| 1406 * Dispatch the notification named [event], and containing parameters | 1401 * Dispatch the notification named [event], and containing parameters |
| 1407 * [params], to the appropriate stream. | 1402 * [params], to the appropriate stream. |
| 1408 */ | 1403 */ |
| 1409 void dispatchNotification(String event, params) { | 1404 void dispatchNotification(String event, params) { |
| 1410 switch (event) { | 1405 switch (event) { |
| 1411 case "server.connected": | 1406 case "server.connected": |
| 1412 expect(params, isServerConnectedParams); | 1407 expect(params, isServerConnectedParams); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1453 _onAnalysisOverrides.add(params); | 1448 _onAnalysisOverrides.add(params); |
| 1454 break; | 1449 break; |
| 1455 case "completion.results": | 1450 case "completion.results": |
| 1456 expect(params, isCompletionResultsParams); | 1451 expect(params, isCompletionResultsParams); |
| 1457 _onCompletionResults.add(params); | 1452 _onCompletionResults.add(params); |
| 1458 break; | 1453 break; |
| 1459 case "search.results": | 1454 case "search.results": |
| 1460 expect(params, isSearchResultsParams); | 1455 expect(params, isSearchResultsParams); |
| 1461 _onSearchResults.add(params); | 1456 _onSearchResults.add(params); |
| 1462 break; | 1457 break; |
| 1463 case "debug.launchData": | 1458 case "execution.launchData": |
| 1464 expect(params, isDebugLaunchDataParams); | 1459 expect(params, isExecutionLaunchDataParams); |
| 1465 _onDebugLaunchData.add(params); | 1460 _onExecutionLaunchData.add(params); |
| 1466 break; | 1461 break; |
| 1467 default: | 1462 default: |
| 1468 fail('Unexpected notification: $event'); | 1463 fail('Unexpected notification: $event'); |
| 1469 break; | 1464 break; |
| 1470 } | 1465 } |
| 1471 } | 1466 } |
| 1472 } | 1467 } |
| OLD | NEW |