mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Use object for refactor.disabled
For #85160 Using an object is more explict with property names and will let us introduce additional properties in the future if needed
This commit is contained in:
@@ -314,7 +314,9 @@ class TypeScriptRefactorProvider implements vscode.CodeActionProvider {
|
||||
private appendInvalidActions(actions: vscode.CodeAction[]): vscode.CodeAction[] {
|
||||
if (!actions.some(action => action.kind && Extract_Constant.kind.contains(action.kind))) {
|
||||
const disabledAction = new vscode.CodeAction('Extract to constant', Extract_Constant.kind);
|
||||
disabledAction.disabled = localize('extract.disabled', "The current selection cannot be extracted");
|
||||
disabledAction.disabled = {
|
||||
reason: localize('extract.disabled', "The current selection cannot be extracted"),
|
||||
};
|
||||
disabledAction.isPreferred = true;
|
||||
actions.push(disabledAction);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user