Skip to content

Commit 7e4ee25

Browse files
remove CreateDeclDefnCommandArguments (#11517)
1 parent 6da9a49 commit 7e4ee25

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

Extension/src/LanguageServer/Providers/codeActionProvider.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ interface GetCodeActionsResult {
3434
commands: CodeActionCommand[];
3535
}
3636

37-
export interface CreateDeclDefnCommandArguments {
38-
sender: string;
39-
range: Range;
40-
}
41-
4237
export const GetCodeActionsRequest: RequestType<GetCodeActionsRequestParams, GetCodeActionsResult, void> =
4338
new RequestType<GetCodeActionsRequestParams, GetCodeActionsResult, void>('cpptools/getCodeActions');
4439

@@ -196,12 +191,8 @@ export class CodeActionProvider implements vscode.CodeActionProvider {
196191
return;
197192
} else if ((command.command === 'C_Cpp.CreateDeclarationOrDefinition' || command.command === 'C_Cpp.CopyDeclarationOrDefinition')
198193
&& (command.arguments ?? []).length === 0 && command.range !== undefined) {
199-
const args: CreateDeclDefnCommandArguments = {
200-
sender: 'codeAction',
201-
range: command.range
202-
};
203194
command.arguments = [];
204-
command.arguments.push(args);
195+
command.arguments.push({ sender: 'codeAction', range: command.range });
205196
} else if (command.command === "C_Cpp.SelectIntelliSenseConfiguration") {
206197
command.arguments = ['codeAction'];
207198
hasSelectIntelliSenseConfiguration = true;

0 commit comments

Comments
 (0)