Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Application Server

Extend the IDE toolbar

  • Last UpdatedJul 23, 2024
  • 2 minute read

IDE extensions can extend the IDE toolbar structure by creating a new toolbar that is displayed in the IDE toolbar, by adding a new toolbar button at the beginning or end of the existing toolbar, or by inserting a toolbar button before and after an existing button. The toolbar and toolbar definitions are provided in the embedded manifest resource. Following are two example extracts from the sample manifest, emphasizing on how to add a new IDE toolbar and toolbar button respectively.

<Resources>

<Toolbar Id="tbarTest">

<Name>Test</Name>

</Toolbar>

</Resources>

Toolbar tag is where new toolbar definition is provided by the extension. Id attribute is the unique identifier of the toolbar, which is referenced by the toolbar buttons placed in it. Name tag is used do display the toolbar list when user tries to hide/show toolbars.

<Resources>

<ToolbarButton Id="tbarTestCI" ParentId="tbarTest"

DefaultPosition="Top">

<CommandId>cmdTestCheckin</CommandId>

<Image>TestCI_16x16.png</Image>

</ToolbarButton>

<Separator ParentId="tbarTestCO" ReferencedTo="tbarTestCI"

ReferencePosition="Before"/>

<ToolbarButton Id="tbarTestCO" ParentId="tbarTest">

<CommandId>cmdTestCheckout</CommandId>

<Image>TestCO_16x16.png</Image>

</ToolbarButton>

</Resources>

  • ToolbarButton tag is where new toolbar button definition should be provided.

    • Id attribute is the identifier of the toolbar button. It can be any unique string, but it is recommended to use identifier close to the command name is attached to for more readability.

    • ParentId is the unique identifier of the toolbar this button will be displayed in. ParentId determines whether the button will be displayed in the standard IDE toolbar or a newly added toolbar. To add a toolbar button to the standard toolbar, extension should provide “tbarStandard” as ParentId.

    • ReferencedTo attribute lets user dictate relative to which other toolbar button this button should be shown. ReferencePosition provides relative position, “Before” or “After”, defaulting to “After”.

    • DefaultPosition attribute in the first toolbar button example dictates whether the button should be displayed at the beginning or end in the toolbar. It defaults to top. DefaultPosition attribute can coexist with ReferencedTo and ReferencePosition attributes combination, in which case it will be used as fall back value when the IDE can not resolve references.

  • CommandId tag is the identifier of the command the toolbar button is associated with.

  • Image tag is the embedded resource image file name for the toolbar button image.

  • Separator tag follows the same pattern as menu separators. The only difference is unlike menu separators, toolbar separator’s ParentId is an identifier of a toolbar.

TODO: Need a table that lists the potential parentIds

In 2023 toolbar functionality is obsolete.

TitleResults for “How to create a CRG?”Also Available in