Add CodeAction.disabled

For #85160
This commit is contained in:
Matt Bierner
2019-11-20 14:29:27 -08:00
parent 37f18e8f2d
commit 4cc8710a38
15 changed files with 53 additions and 33 deletions

View File

@@ -307,7 +307,7 @@ class CodeActionOnSaveParticipant implements ISaveParticipant {
for (const codeActionKind of codeActionsOnSave) {
const actionsToRun = await this.getActionsToRun(model, codeActionKind, excludes, token);
try {
await this.applyCodeActions(actionsToRun.actions);
await this.applyCodeActions(actionsToRun.validActions);
} catch {
// Failure to apply a code action should not block other on save actions
} finally {

View File

@@ -1086,6 +1086,7 @@ export interface ICodeActionDto {
command?: ICommandDto;
kind?: string;
isPreferred?: boolean;
disabled?: string;
}
export interface ICodeActionListDto {

View File

@@ -389,6 +389,7 @@ class CodeActionAdapter {
edit: candidate.edit && typeConvert.WorkspaceEdit.from(candidate.edit),
kind: candidate.kind && candidate.kind.value,
isPreferred: candidate.isPreferred,
disabled: candidate.disabled
});
}
}