提交 a28560ed 编写于 作者: J Johannes Rieken

inform about command duplications

上级 41b284de
......@@ -189,6 +189,9 @@ function handleCommand(command: Command, user: IExtensionPointUser<any>): void {
if (validation.isValidCommand(command, user)) {
// store command globally
const parsedCommand = new ParsedCommand(user.description, command.command, command.title, command.category, command.icon, command.when, command.where);
if (_commandsById[parsedCommand.id]) {
user.collector.info(localize('command.overwrite', "Command `{0}` appears multiple times in the `commands` section.", parsedCommand.id));
}
_commandsById[parsedCommand.id] = parsedCommand;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册