i2 Notebook SDK
Search results for

    Show/hide table of contents

    Home > @i2analyze/notebook-sdk > commands > IActionArea > addOrGetGroup

    commands.IActionArea.addOrGetGroup() method

    Adds the specified group of actions to the user interface, or gets an existing group with the same identifier.

    Signature:

    addOrGetGroup<TCommandType extends CommandType = 'unscoped'>(group: IGroup<TCommandType>): IActionArea<undefined>;
    

    Introduced: version 1.0

    Type Parameters

    Parameter Type Description
    TCommandType extends CommandType(default: 'unscoped') The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.

    Parameters

    Parameter Type Description
    group IGroup<TCommandType> The group to add or get.

    Returns:

    IActionArea<undefined>

    An object that you can use to add actions or a further group to the new or existing group.

    Exceptions

    Error if the group was not valid, or if it was added before by the same plug-in.

    Remarks

    In general, if you want to add a group, use commands.IActionArea.addGroup(). If you want to get a group before surfacing commands or adding a group to it, use commands.IActionArea.getGroup(). However, if you are creating multiple plug-ins that want to use the same group, and these plug-ins can be deployed independently, then you should use this method.

    In this article
    Back to top © N. Harris Computer Corporation