Rename CodeAction.canAutoApply -> CodeAction.preferred

Part of #62110

Use the more generic name as suggested in https://github.com/Dart-Code/Dart-Code/issues/1393. This makes the intent of the field more clear and also allows us to extend the concept of preferred code actions to refactorings and other classes of code actions

Experimentally also allows a `preferred` value for `apply` when configuring code aciton keyboard shortcuts. This applies the preferred code action returned from the list of code actions returned
This commit is contained in:
Matt Bierner
2019-01-17 17:52:46 -08:00
parent 0e90c2e328
commit bcc2281e45
9 changed files with 33 additions and 20 deletions

View File

@@ -270,7 +270,7 @@ class TypeScriptQuickFixProvider implements vscode.CodeActionProvider {
title: ''
};
if (tsAction.fixName === 'spelling') {
codeAction.canAutoApply = true;
codeAction.isPreferred = true;
}
return codeAction;
}