提交 379bf086 编写于 作者: B Benjamin Pasero

💄

上级 05b667d5
......@@ -76,7 +76,6 @@ interface IActionDescriptor {
// ICommandUI
title: string;
category?: string;
iconClass?: string;
f1?: boolean;
//
......@@ -96,13 +95,13 @@ interface IActionDescriptor {
function registerAction(desc: IActionDescriptor) {
const { id, handler, title, category, iconClass, menu, keybinding } = desc;
const { id, handler, title, category, menu, keybinding } = desc;
// 1) register as command
CommandsRegistry.registerCommand(id, handler);
// 2) menus
let command = { id, title, iconClass, category };
let command = { id, title, category };
if (menu) {
let { menuId, when, group } = menu;
MenuRegistry.appendMenuItem(menuId, {
......
......@@ -91,7 +91,6 @@ interface IActionDescriptor {
// ICommandUI
title: string;
category?: string;
iconClass?: string;
f1?: boolean;
// menus
......@@ -111,13 +110,13 @@ interface IActionDescriptor {
function registerAction(desc: IActionDescriptor) {
const { id, handler, title, category, iconClass, f1, menu, keybinding } = desc;
const { id, handler, title, category, f1, menu, keybinding } = desc;
// 1) register as command
CommandsRegistry.registerCommand(id, handler);
// 2) command palette
let command = { id, title, iconClass, category };
let command = { id, title, category };
if (f1) {
MenuRegistry.addCommand(command);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册