Interface MutableCompoundMenuNodeInternal

For most use cases refer to MenuNode, CommandMenuNode, or CompoundMenuNode

interface MutableCompoundMenuNode {
    children: readonly MenuNode[];
    icon?: string;
    id: string;
    isSubmenu: boolean;
    label?: string;
    parent?: MenuNode;
    role: CompoundMenuNodeRole;
    sortString: string;
    when?: string;
    addNode(node): Disposable;
    removeNode(id): void;
    updateOptions(options): void;
}

Hierarchy (view full)

Implemented by

Properties

children: readonly MenuNode[]

Items that are grouped under this menu.

icon?: string

Icon classes for the menu node. If present, these will produce an icon to the left of the label in browser-style menus.

id: string

technical identifier.

isSubmenu: boolean

Deprecated

Since

1.28 use role instead. Whether the item should be rendered as a submenu.

label?: string

Optional label. Will be rendered as text of the menu item.

parent?: MenuNode

A reference to the parent node - useful for determining the menu path by which the node can be accessed.

How the node and its children should be rendered. See CompoundMenuNodeRole.

sortString: string

Menu nodes are sorted in ascending order based on their sortString.

when?: string

Condition under which the menu node should be rendered. See https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts

Methods