Extend context menus
- Last UpdatedJul 23, 2024
- 1 minute read
IDE extensions can add new menu items to the IDE context menus shown in any of the IDE views including extension views. IDE has two predefined context menus; “cntxtmenuObjects” for galaxy objects and “cntxtmenuToolsets” for toolsets. If needed, extension developer can add a new context menu also. An IDE extension can add a new menu item to these context menus. Adding a new context menu item is exactly the same as explained in the previous section, the only difference is the ParentId of the context menu item must be the identifier of the context menu instead of main menu.
For example, to add a new menu item after “Open Read-Only” in the object context menu, surrounded by separators, extension needs to add the following information in the manifest resource.
<Resources>
<MenuItem Id="cntxtmenuObjects/TestCI"
ParentId="cntxtmenuObjects"
ReferencedTo="cntxtmenuObjects/OpenReadOnly"
ReferencePosition="After">
<CommandId>cmdTestCheckin</CommandId>
<Text>Test Check-&in</Text>
</MenuItem>
<Separator ParentId="cntxtmenuObjects"
ReferencedTo="cntxtmenuObjects/TestCI"
ReferencePosition="Before"/>
</Resources>
TODO: Need a table that lists the potential parentIds