Skip to content

Commit

Permalink
remove CreateDeclDefnCommandArguments (#11517)
Browse files Browse the repository at this point in the history
  • Loading branch information
michelleangela authored Oct 10, 2023
1 parent 6da9a49 commit 7e4ee25
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions Extension/src/LanguageServer/Providers/codeActionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ interface GetCodeActionsResult {
commands: CodeActionCommand[];
}

export interface CreateDeclDefnCommandArguments {
sender: string;
range: Range;
}

export const GetCodeActionsRequest: RequestType<GetCodeActionsRequestParams, GetCodeActionsResult, void> =
new RequestType<GetCodeActionsRequestParams, GetCodeActionsResult, void>('cpptools/getCodeActions');

Expand Down Expand Up @@ -196,12 +191,8 @@ export class CodeActionProvider implements vscode.CodeActionProvider {
return;
} else if ((command.command === 'C_Cpp.CreateDeclarationOrDefinition' || command.command === 'C_Cpp.CopyDeclarationOrDefinition')
&& (command.arguments ?? []).length === 0 && command.range !== undefined) {
const args: CreateDeclDefnCommandArguments = {
sender: 'codeAction',
range: command.range
};
command.arguments = [];
command.arguments.push(args);
command.arguments.push({ sender: 'codeAction', range: command.range });
} else if (command.command === "C_Cpp.SelectIntelliSenseConfiguration") {
command.arguments = ['codeAction'];
hasSelectIntelliSenseConfiguration = true;
Expand Down

0 comments on commit 7e4ee25

Please sign in to comment.