Skip to content

CommandSwitchesController.setCommandShownInMenus method

CommandSwitchesController › setCommandShownInMenus

Shows or hides one command in the context menus.

Signature:

setCommandShownInMenus(commandId: string, isShown: boolean): Promise<void>

Parameters:

ParameterTypeDescription
commandIdstringThe command id, without the plugin-id prefix.
isShownbooleanWhether the context menus may offer the command.

Returns: Promise<void> — A Promise that resolves when the switches are saved.