Interface CompoundMenuNodeInternal

For most use cases, refer to MenuAction or MenuNode

interface CompoundMenuNode {
    children: MenuNode[];
    contextKeyOverlays?: Record<string, string>;
    id: string;
    onDidChange?: Event<void>;
    sortString: string;
    isEmpty<T>(effectiveMenuPath, contextMatcher, context, ...args): boolean;
    isVisible<T>(effectiveMenuPath, contextMatcher, context, ...args): boolean;
}

Hierarchy (view full)

Implemented by

Properties

children: MenuNode[]
contextKeyOverlays?: Record<string, string>
id: string

technical identifier.

onDidChange?: Event<void>
sortString: string

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

Methods

  • Whether the group or submenu contains any visible children

    Type Parameters

    • T

    Parameters

    • effectiveMenuPath: MenuPath

      The menu path where visibility is checked

    • contextMatcher: ContextExpressionMatcher<T>

      The context matcher to use

    • context: undefined | T

      the context to use

    • Rest ...args: unknown[]

      the command arguments, if applicable

    Returns boolean