mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-23 19:59:37 +00:00
Always invoke quick fix command
Make sure we always invoke the applyCodeActionCommand. This is needed for telemetry to be sent properly
This commit is contained in:
@@ -30,19 +30,18 @@ class ApplyCodeActionCommand implements Command {
|
||||
public async execute(
|
||||
action: Proto.CodeFixAction
|
||||
): Promise<boolean> {
|
||||
if (action.fixName) {
|
||||
/* __GDPR__
|
||||
"quickFix.execute" : {
|
||||
"fixName" : { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" },
|
||||
"${include}": [
|
||||
"${TypeScriptCommonProperties}"
|
||||
]
|
||||
}
|
||||
*/
|
||||
this.telemetryReporter.logTelemetry('quickFix.execute', {
|
||||
fixName: action.fixName
|
||||
});
|
||||
}
|
||||
/* __GDPR__
|
||||
"quickFix.execute" : {
|
||||
"fixName" : { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" },
|
||||
"${include}": [
|
||||
"${TypeScriptCommonProperties}"
|
||||
]
|
||||
}
|
||||
*/
|
||||
this.telemetryReporter.logTelemetry('quickFix.execute', {
|
||||
fixName: action.fixName
|
||||
});
|
||||
|
||||
return applyCodeActionCommands(this.client, action.commands);
|
||||
}
|
||||
}
|
||||
@@ -264,13 +263,11 @@ class TypeScriptQuickFixProvider implements vscode.CodeActionProvider {
|
||||
const codeAction = new vscode.CodeAction(tsAction.description, vscode.CodeActionKind.QuickFix);
|
||||
codeAction.edit = getEditForCodeAction(this.client, tsAction);
|
||||
codeAction.diagnostics = [diagnostic];
|
||||
if (tsAction.commands) {
|
||||
codeAction.command = {
|
||||
command: ApplyCodeActionCommand.ID,
|
||||
arguments: [tsAction],
|
||||
title: tsAction.description
|
||||
};
|
||||
}
|
||||
codeAction.command = {
|
||||
command: ApplyCodeActionCommand.ID,
|
||||
arguments: [tsAction],
|
||||
title: ''
|
||||
};
|
||||
return codeAction;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user