提交 e2fed923 编写于 作者: M Matt Bierner

Mark preferred code actions with a star in the code action list

#66702

Experimentally mark preferred code actions with a star while we come up with better UX for this
上级 e42d49be
......@@ -51,8 +51,12 @@ export class CodeActionContextMenu {
}
private codeActionToAction(action: CodeAction): Action {
return new Action(action.command ? action.command.id : action.title, action.title, undefined, true, () => {
return always(this._onApplyCodeAction(action), () => this._onDidExecuteCodeAction.fire(undefined));
const id = action.command ? action.command.id : action.title;
const title = action.isPreferred ? `${action.title} ★` : action.title;
return new Action(id, title, undefined, true, () => {
return always(
this._onApplyCodeAction(action),
() => this._onDidExecuteCodeAction.fire(undefined));
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册