Rename the request as updateOpen

This commit is contained in:
Sheetal Nandi 2019-03-05 14:33:48 -08:00
parent 03377f70b7
commit e55fbffed6
4 changed files with 16 additions and 16 deletions

View File

@ -92,7 +92,7 @@ namespace ts.server.protocol {
SynchronizeProjectList = "synchronizeProjectList",
/* @internal */
ApplyChangedToOpenFiles = "applyChangedToOpenFiles",
ApplyChangesToOpenFiles = "applyChangesToOpenFiles",
UpdateOpen = "updateOpen",
/* @internal */
EncodedSemanticClassificationsFull = "encodedSemanticClassifications-full",
/* @internal */
@ -1547,15 +1547,15 @@ namespace ts.server.protocol {
/**
* Request to synchronize list of open files with the client
*/
export interface ApplyChangesToOpenFilesRequest extends Request {
command: CommandTypes.ApplyChangesToOpenFiles;
arguments: ApplyChangesToOpenFilesRequestArgs;
export interface UpdateOpenRequest extends Request {
command: CommandTypes.UpdateOpen;
arguments: UpdateOpenRequestArgs;
}
/**
* Arguments to ApplyChangesToOpenFilesRequest
* Arguments to UpdateOpenRequest
*/
export interface ApplyChangesToOpenFilesRequestArgs {
export interface UpdateOpenRequestArgs {
/**
* List of newly open files
*/

View File

@ -2096,7 +2096,7 @@ namespace ts.server {
});
return this.requiredResponse(converted);
},
[CommandNames.ApplyChangesToOpenFiles]: (request: protocol.ApplyChangesToOpenFilesRequest) => {
[CommandNames.UpdateOpen]: (request: protocol.UpdateOpenRequest) => {
this.changeSeq++;
this.projectService.applyChangesInOpenFiles(
request.arguments.openFiles && mapIterator(arrayIterator(request.arguments.openFiles), file => ({

View File

@ -105,10 +105,10 @@ ${file.content}`;
);
});
it("with applyChangesToOpenFiles request", () => {
it("with updateOpen request", () => {
verify(session =>
session.executeCommandSeq<protocol.ApplyChangesToOpenFilesRequest>({
command: protocol.CommandTypes.ApplyChangesToOpenFiles,
session.executeCommandSeq<protocol.UpdateOpenRequest>({
command: protocol.CommandTypes.UpdateOpen,
arguments: {
openFiles: [
{

View File

@ -5720,7 +5720,7 @@ declare namespace ts.server.protocol {
OpenExternalProject = "openExternalProject",
OpenExternalProjects = "openExternalProjects",
CloseExternalProject = "closeExternalProject",
ApplyChangesToOpenFiles = "applyChangesToOpenFiles",
UpdateOpen = "updateOpen",
GetOutliningSpans = "getOutliningSpans",
TodoComments = "todoComments",
Indentation = "indentation",
@ -6792,14 +6792,14 @@ declare namespace ts.server.protocol {
/**
* Request to synchronize list of open files with the client
*/
interface ApplyChangesToOpenFilesRequest extends Request {
command: CommandTypes.ApplyChangesToOpenFiles;
arguments: ApplyChangesToOpenFilesRequestArgs;
interface UpdateOpenRequest extends Request {
command: CommandTypes.UpdateOpen;
arguments: UpdateOpenRequestArgs;
}
/**
* Arguments to ApplyChangesToOpenFilesRequest
* Arguments to UpdateOpenRequest
*/
interface ApplyChangesToOpenFilesRequestArgs {
interface UpdateOpenRequestArgs {
/**
* List of newly open files
*/